hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1647643 - in /httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie: ClientCookie.java Cookie.java CookieSpec.java SetCookie.java SetCookie2.java
Date Tue, 23 Dec 2014 19:02:41 GMT
Author: olegk
Date: Tue Dec 23 19:02:41 2014
New Revision: 1647643

URL: http://svn.apache.org/r1647643
Log:
Marked Cookie API methods obsoleted by RFC 6265 with @Obsolete annotation

Modified:
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/ClientCookie.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/Cookie.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieSpec.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/SetCookie.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/SetCookie2.java

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/ClientCookie.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/ClientCookie.java?rev=1647643&r1=1647642&r2=1647643&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/ClientCookie.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/ClientCookie.java
Tue Dec 23 19:02:41 2014
@@ -27,6 +27,8 @@
 
 package org.apache.http.cookie;
 
+import org.apache.http.annotation.Obsolete;
+
 /**
  * ClientCookie extends the standard {@link Cookie} interface with
  * additional client specific functionality such ability to retrieve
@@ -35,24 +37,29 @@ package org.apache.http.cookie;
  * header because some cookie specifications require that the
  * {@code Cookie} header should include certain attributes only if
  * they were specified in the {@code Set-Cookie} header.
- *
+ * <p>
+ * Please do not use attributes marked as @Obsolete. They have been rendered
+ * obsolete by RFC 6265.
  *
  * @since 4.0
  */
 public interface ClientCookie extends Cookie {
 
-    // RFC2109 attributes
+    @Obsolete
     public static final String VERSION_ATTR    = "version";
     public static final String PATH_ATTR       = "path";
     public static final String DOMAIN_ATTR     = "domain";
     public static final String MAX_AGE_ATTR    = "max-age";
     public static final String SECURE_ATTR     = "secure";
+    @Obsolete
     public static final String COMMENT_ATTR    = "comment";
     public static final String EXPIRES_ATTR    = "expires";
 
-    // RFC2965 attributes
+    @Obsolete
     public static final String PORT_ATTR       = "port";
+    @Obsolete
     public static final String COMMENTURL_ATTR = "commenturl";
+    @Obsolete
     public static final String DISCARD_ATTR    = "discard";
 
     String getAttribute(String name);

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/Cookie.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/Cookie.java?rev=1647643&r1=1647642&r2=1647643&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/Cookie.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/Cookie.java
Tue Dec 23 19:02:41 2014
@@ -29,11 +29,16 @@ package org.apache.http.cookie;
 
 import java.util.Date;
 
+import org.apache.http.annotation.Obsolete;
+
 /**
  * Cookie interface represents a token or short packet of state information
  * (also referred to as "magic-cookie") that the HTTP agent and the target
  * server can exchange to maintain a session. In its simples form an HTTP
  * cookie is merely a name / value pair.
+ * <p>
+ * Please do not use attributes marked as @Obsolete. They have been rendered
+ * obsolete by RFC 6265.
  *
  * @since 4.0
  */
@@ -59,12 +64,14 @@ public interface Cookie {
      *
      * @return comment
      */
+    @Obsolete
     String getComment();
 
     /**
      * If a user agent (web browser) presents this cookie to a user, the
      * cookie's purpose will be described by the information at this URL.
      */
+    @Obsolete
     String getCommentURL();
 
     /**
@@ -107,6 +114,7 @@ public interface Cookie {
      * Get the Port attribute. It restricts the ports to which a cookie
      * may be returned in a Cookie request header.
      */
+    @Obsolete
     int[] getPorts();
 
     /**
@@ -123,6 +131,7 @@ public interface Cookie {
      *
      * @return the version of the cookie.
      */
+    @Obsolete
     int getVersion();
 
     /**

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieSpec.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieSpec.java?rev=1647643&r1=1647642&r2=1647643&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieSpec.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieSpec.java
Tue Dec 23 19:02:41 2014
@@ -30,6 +30,7 @@ package org.apache.http.cookie;
 import java.util.List;
 
 import org.apache.http.Header;
+import org.apache.http.annotation.Obsolete;
 
 /**
  * Defines the cookie management specification.
@@ -40,7 +41,9 @@ import org.apache.http.Header;
  *   <li>  formatting of "Cookie" header
  * </ul>
  * for a given host, port and path of origin
- *
+ * <p>
+ * Please do not use methods marked as @Obsolete. They have been rendered
+ * obsolete by RFC 6265.
  *
  * @since 4.0
  */
@@ -52,6 +55,7 @@ public interface CookieSpec {
      *
      * @return version of the state management specification
      */
+    @Obsolete
     int getVersion();
 
     /**
@@ -104,6 +108,7 @@ public interface CookieSpec {
      * specification is understood. May be {@code null} if the cookie
      * specification does not support {@code Cookie2} header.
      */
+    @Obsolete
     Header getVersionHeader();
 
 }

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/SetCookie.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/SetCookie.java?rev=1647643&r1=1647642&r2=1647643&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/SetCookie.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/SetCookie.java
Tue Dec 23 19:02:41 2014
@@ -29,9 +29,14 @@ package org.apache.http.cookie;
 
 import java.util.Date;
 
+import org.apache.http.annotation.Obsolete;
+
 /**
  * This interface represents a {@code Set-Cookie} response header sent by the
  * origin server to the HTTP agent in order to maintain a conversational state.
+ * <p>
+ * Please do not use methods marked as @Obsolete. They have been rendered
+ * obsolete by RFC 6265
  *
  * @since 4.0
  */
@@ -47,6 +52,7 @@ public interface SetCookie extends Cooki
      *
      * @see #getComment()
      */
+    @Obsolete
     void setComment(String comment);
 
     /**
@@ -103,6 +109,7 @@ public interface SetCookie extends Cooki
      *
      * @see Cookie#getVersion
      */
+    @Obsolete
     void setVersion(int version);
 
 }

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/SetCookie2.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/SetCookie2.java?rev=1647643&r1=1647642&r2=1647643&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/SetCookie2.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/SetCookie2.java
Tue Dec 23 19:02:41 2014
@@ -27,9 +27,14 @@
 
 package org.apache.http.cookie;
 
+import org.apache.http.annotation.Obsolete;
+
 /**
  * This interface represents a {@code Set-Cookie2} response header sent by the
  * origin server to the HTTP agent in order to maintain a conversational state.
+ * <p>
+ * Please do not use methods marked as @Obsolete. They have been rendered
+ * obsolete by RFC 6265
  *
  * @since 4.0
  */
@@ -39,12 +44,14 @@ public interface SetCookie2 extends SetC
      * If a user agent (web browser) presents this cookie to a user, the
      * cookie's purpose will be described by the information at this URL.
      */
+    @Obsolete
     void setCommentURL(String commentURL);
 
     /**
      * Sets the Port attribute. It restricts the ports to which a cookie
      * may be returned in a Cookie request header.
      */
+    @Obsolete
     void setPorts(int[] ports);
 
     /**
@@ -54,6 +61,7 @@ public interface SetCookie2 extends SetC
      *
      * @see #isPersistent()
      */
+    @Obsolete
     void setDiscard(boolean discard);
 
 }



Mime
View raw message