This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit ee923b135e85cd8fcf9314d7a3a78a7ad8afede3
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon May 24 12:40:42 2021 +0100

    Sync Tomcat 10.1.x with latest Servlet 5.1 API. Implementation is TODO
---
 java/jakarta/servlet/http/Cookie.java | 43 +++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/java/jakarta/servlet/http/Cookie.java 
b/java/jakarta/servlet/http/Cookie.java
index 48a621b..084e1e1 100644
--- a/java/jakarta/servlet/http/Cookie.java
+++ b/java/jakarta/servlet/http/Cookie.java
@@ -22,6 +22,7 @@ import java.security.PrivilegedAction;
 import java.text.MessageFormat;
 import java.util.BitSet;
 import java.util.Locale;
+import java.util.Map;
 import java.util.ResourceBundle;
 
 /**
@@ -409,6 +410,48 @@ public class Cookie implements Cloneable, Serializable {
     public boolean isHttpOnly() {
         return httpOnly;
     }
+
+    /**
+     * Sets the value for the given cookie attribute. When a value is set via
+     * this method, the value returned by the attribute specific getter (if 
any)
+     * must be consistent with the value set via this method.
+     *
+     * @param name  Name of attribute to set
+     * @param value Value of attribute
+     *
+     * @throws IllegalArgumentException If the attribute name is null, contains
+     *         any characters not permitted foe use in Cookie names or matches 
a
+     *         name reserved by the cookie specification.
+     *
+     * @throws NumberFormatException If the attribute is known to be numerical
+     *         but the provided value cannot be parsed to a number.
+     *
+     * @since Servlet 5.1
+     */
+    public void setAttribute(String name, String value) {
+        // TODO - Servlet 5.1
+    }
+
+    /**
+     * Obtain the value for a given attribute. Values returned from this method
+     * must be consistent with the values set and returned by the attribute
+     * specific getters and setters in this class.
+     *
+     * @param name  Name of attribute to return
+     *
+     * @return Value of specified attribute
+     *
+     * @since Servlet 5.1
+     */
+    public String getAttribute(String name) {
+        // TODO - Servlet 5.1
+        return null;
+    }
+
+    public Map<String,String> getAttributes() {
+        // TODO - Servlet 5.1
+        return null;
+    }
 }
 
 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to