hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r797270 - in /httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http: client/methods/ client/protocol/ conn/ssl/ impl/auth/ impl/conn/ impl/cookie/
Date Fri, 24 Jul 2009 00:03:53 GMT
Author: sebb
Date: Fri Jul 24 00:03:52 2009
New Revision: 797270

URL: http://svn.apache.org/viewvc?rev=797270&view=rev
Log:
Add thread-safety annotations

Modified:
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpEntityEnclosingRequestBase.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestClientConnControl.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/AuthSchemeBase.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/RFC2617Scheme.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/DefaultClientConnection.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/AbstractCookieSpec.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BrowserCompatSpec.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/CookieSpecBase.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/NetscapeDraftSpec.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2109Spec.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2965Spec.java

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpEntityEnclosingRequestBase.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpEntityEnclosingRequestBase.java?rev=797270&r1=797269&r2=797270&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpEntityEnclosingRequestBase.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpEntityEnclosingRequestBase.java
Fri Jul 24 00:03:52 2009
@@ -27,6 +27,8 @@
 
 package org.apache.http.client.methods;
 
+import net.jcip.annotations.NotThreadSafe;
+
 import org.apache.http.Header;
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpEntityEnclosingRequest;
@@ -39,6 +41,7 @@
  * 
  * @since 4.0
  */
+@NotThreadSafe // HttpRequestBase is @NotThreadSafe
 public abstract class HttpEntityEnclosingRequestBase 
     extends HttpRequestBase implements HttpEntityEnclosingRequest {
     

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestClientConnControl.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestClientConnControl.java?rev=797270&r1=797269&r2=797270&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestClientConnControl.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestClientConnControl.java
Fri Jul 24 00:03:52 2009
@@ -29,6 +29,8 @@
 
 import java.io.IOException;
 
+import net.jcip.annotations.Immutable;
+
 import org.apache.http.HttpException;
 import org.apache.http.HttpRequest;
 import org.apache.http.HttpRequestInterceptor;
@@ -45,6 +47,7 @@
  * 
  * @since 4.0
  */
+@Immutable
 public class RequestClientConnControl implements HttpRequestInterceptor {
 
     private static final String PROXY_CONN_DIRECTIVE = "Proxy-Connection";

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java?rev=797270&r1=797269&r2=797270&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java
Fri Jul 24 00:03:52 2009
@@ -144,7 +144,7 @@
  *
  * @since 4.0
  */
-@NotThreadSafe
+@NotThreadSafe // [gs]etHostNameVerifier
 public class SSLSocketFactory implements LayeredSocketFactory {
 
     public static final String TLS   = "TLS";

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/AuthSchemeBase.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/AuthSchemeBase.java?rev=797270&r1=797269&r2=797270&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/AuthSchemeBase.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/AuthSchemeBase.java
Fri Jul 24 00:03:52 2009
@@ -26,6 +26,8 @@
 
 package org.apache.http.impl.auth;
 
+import net.jcip.annotations.NotThreadSafe;
+
 import org.apache.http.FormattedHeader;
 import org.apache.http.Header;
 import org.apache.http.auth.AUTH;
@@ -44,6 +46,7 @@
  *
  * @since 4.0
  */
+@NotThreadSafe // proxy
 public abstract class AuthSchemeBase implements AuthScheme {
 
     /**

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/RFC2617Scheme.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/RFC2617Scheme.java?rev=797270&r1=797269&r2=797270&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/RFC2617Scheme.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/RFC2617Scheme.java
Fri Jul 24 00:03:52 2009
@@ -30,6 +30,8 @@
 import java.util.Locale;
 import java.util.Map;
 
+import net.jcip.annotations.NotThreadSafe;
+
 import org.apache.http.HeaderElement;
 import org.apache.http.auth.MalformedChallengeException;
 import org.apache.http.message.BasicHeaderValueParser;
@@ -44,6 +46,7 @@
  *
  * @since 4.0
  */
+@NotThreadSafe // AuthSchemeBase, params
 public abstract class RFC2617Scheme extends AuthSchemeBase {
 
     /**

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/DefaultClientConnection.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/DefaultClientConnection.java?rev=797270&r1=797269&r2=797270&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/DefaultClientConnection.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/DefaultClientConnection.java
Fri Jul 24 00:03:52 2009
@@ -30,6 +30,8 @@
 import java.io.IOException;
 import java.net.Socket;
 
+import net.jcip.annotations.NotThreadSafe;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.http.Header;
@@ -61,6 +63,7 @@
  *
  * @since 4.0
  */
+@NotThreadSafe // connSecure, targetHost
 public class DefaultClientConnection extends SocketHttpClientConnection
     implements OperatedClientConnection {
 

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/AbstractCookieSpec.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/AbstractCookieSpec.java?rev=797270&r1=797269&r2=797270&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/AbstractCookieSpec.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/AbstractCookieSpec.java
Fri Jul 24 00:03:52 2009
@@ -31,6 +31,8 @@
 import java.util.HashMap;
 import java.util.Map;
 
+import net.jcip.annotations.NotThreadSafe;
+
 import org.apache.http.cookie.CookieAttributeHandler;
 import org.apache.http.cookie.CookieSpec;
 
@@ -42,6 +44,7 @@
  * 
  * @since 4.0 
  */
+@NotThreadSafe // HashMap is not thread-safe
 public abstract class AbstractCookieSpec implements CookieSpec {
     
     /**

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BrowserCompatSpec.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BrowserCompatSpec.java?rev=797270&r1=797269&r2=797270&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BrowserCompatSpec.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BrowserCompatSpec.java
Fri Jul 24 00:03:52 2009
@@ -31,6 +31,8 @@
 import java.util.List;
 import java.util.Locale;
 
+import net.jcip.annotations.NotThreadSafe;
+
 import org.apache.http.FormattedHeader;
 import org.apache.http.Header;
 import org.apache.http.HeaderElement;
@@ -51,6 +53,7 @@
  * 
  * @since 4.0 
  */
+@NotThreadSafe // superclass is @NotThreadSafe
 public class BrowserCompatSpec extends CookieSpecBase {
     
     @Deprecated

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/CookieSpecBase.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/CookieSpecBase.java?rev=797270&r1=797269&r2=797270&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/CookieSpecBase.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/CookieSpecBase.java
Fri Jul 24 00:03:52 2009
@@ -31,6 +31,8 @@
 import java.util.List;
 import java.util.Locale;
 
+import net.jcip.annotations.NotThreadSafe;
+
 import org.apache.http.HeaderElement;
 import org.apache.http.NameValuePair;
 import org.apache.http.cookie.Cookie;
@@ -44,6 +46,7 @@
  * 
  * @since 4.0 
  */
+@NotThreadSafe // AbstractCookieSpec is not thread-safe
 public abstract class CookieSpecBase extends AbstractCookieSpec {
     
     protected static String getDefaultPath(final CookieOrigin origin) {

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/NetscapeDraftSpec.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/NetscapeDraftSpec.java?rev=797270&r1=797269&r2=797270&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/NetscapeDraftSpec.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/NetscapeDraftSpec.java
Fri Jul 24 00:03:52 2009
@@ -30,7 +30,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import net.jcip.annotations.Immutable;
+import net.jcip.annotations.NotThreadSafe;
 
 import org.apache.http.FormattedHeader;
 import org.apache.http.Header;
@@ -52,7 +52,7 @@
  * 
  * @since 4.0 
  */
-@Immutable
+@NotThreadSafe // superclass is @NotThreadSafe
 public class NetscapeDraftSpec extends CookieSpecBase {
 
     protected static final String EXPIRES_PATTERN = "EEE, dd-MMM-yyyy HH:mm:ss z";

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2109Spec.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2109Spec.java?rev=797270&r1=797269&r2=797270&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2109Spec.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2109Spec.java
Fri Jul 24 00:03:52 2009
@@ -31,7 +31,7 @@
 import java.util.Collections;
 import java.util.List;
 
-import net.jcip.annotations.Immutable;
+import net.jcip.annotations.NotThreadSafe;
 
 import org.apache.http.Header;
 import org.apache.http.HeaderElement;
@@ -54,7 +54,7 @@
  * 
  * @since 4.0 
  */
-@Immutable
+@NotThreadSafe // superclass is @NotThreadSafe
 public class RFC2109Spec extends CookieSpecBase {
 
     private final static CookiePathComparator PATH_COMPARATOR = new CookiePathComparator();


Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2965Spec.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2965Spec.java?rev=797270&r1=797269&r2=797270&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2965Spec.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2965Spec.java
Fri Jul 24 00:03:52 2009
@@ -32,6 +32,8 @@
 import java.util.Locale;
 import java.util.Map;
 
+import net.jcip.annotations.NotThreadSafe;
+
 import org.apache.http.Header;
 import org.apache.http.HeaderElement;
 import org.apache.http.NameValuePair;
@@ -50,6 +52,7 @@
  *
  * @since 4.0
  */
+@NotThreadSafe // superclass is @NotThreadSafe
 public class RFC2965Spec extends RFC2109Spec {
 
     /** 



Mime
View raw message