Author: markt
Date: Mon Nov  9 12:34:45 2009
New Revision: 834034

URL: http://svn.apache.org/viewvc?rev=834034&view=rev
Log:
Cookie is now serializable in Servlet 3.0
Fix some Eclipse warnings

Modified:
    tomcat/trunk/java/javax/servlet/http/Cookie.java

Modified: tomcat/trunk/java/javax/servlet/http/Cookie.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/http/Cookie.java?rev=834034&r1=834033&r2=834034&view=diff
==============================================================================
--- tomcat/trunk/java/javax/servlet/http/Cookie.java (original)
+++ tomcat/trunk/java/javax/servlet/http/Cookie.java Mon Nov  9 12:34:45 2009
@@ -16,6 +16,7 @@
 */
 package javax.servlet.http;
 
+import java.io.Serializable;
 import java.text.MessageFormat;
 import java.util.ResourceBundle;
 
@@ -58,12 +59,9 @@
  * @version    $Version$
  *
  */
+public class Cookie implements Cloneable, Serializable {
 
-// XXX would implement java.io.Serializable too, but can't do that
-// so long as sun.servlet.* must run on older JDK 1.02 JVMs which
-// don't include that support.
-
-public class Cookie implements Cloneable {
+    private static final long serialVersionUID = 1L;
 
     private static final String LSTRING_FILE =
        "javax.servlet.http.LocalStrings";
@@ -560,11 +558,11 @@
      *                         a reserved token; <code>false</code>
      *                         if it is not                    
      */
-    private boolean isToken(String value) {
-        int len = value.length();
+    private boolean isToken(String possibleToken) {
+        int len = possibleToken.length();
 
         for (int i = 0; i < len; i++) {
-            char c = value.charAt(i);
+            char c = possibleToken.charAt(i);
 
             if (c < 0x20 || c >= 0x7f || tspecials.indexOf(c) != -1 ||
                     (STRICT_NAMING && tspecials2.indexOf(c) != -1)) {



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to