hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1770506 [4/6] - in /httpcomponents/httpclient/branches/4.5.x: ./ fluent-hc/src/main/java/org/apache/http/client/fluent/ httpclient-cache/src/main/java-deprecated/org/apache/http/impl/client/cache/ httpclient-cache/src/main/java/org/apache/...
Date Sat, 19 Nov 2016 16:40:56 GMT
Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/routing/HttpRoute.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/routing/HttpRoute.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/routing/HttpRoute.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/routing/HttpRoute.java Sat Nov 19 16:40:54 2016
@@ -35,7 +35,8 @@ import java.util.Collections;
 import java.util.List;
 
 import org.apache.http.HttpHost;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.util.Args;
 import org.apache.http.util.LangUtils;
 
@@ -44,7 +45,7 @@ import org.apache.http.util.LangUtils;
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public final class HttpRoute implements RouteInfo, Cloneable {
 
     /** The target host to connect to. */

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/routing/RouteTracker.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/routing/RouteTracker.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/routing/RouteTracker.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/routing/RouteTracker.java Sat Nov 19 16:40:54 2016
@@ -30,7 +30,6 @@ package org.apache.http.conn.routing;
 import java.net.InetAddress;
 
 import org.apache.http.HttpHost;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.util.Args;
 import org.apache.http.util.Asserts;
 import org.apache.http.util.LangUtils;
@@ -40,7 +39,6 @@ import org.apache.http.util.LangUtils;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public final class RouteTracker implements RouteInfo, Cloneable {
 
     /** The target host to connect to. */

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/scheme/Scheme.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/scheme/Scheme.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/scheme/Scheme.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/scheme/Scheme.java Sat Nov 19 16:40:54 2016
@@ -28,7 +28,8 @@ package org.apache.http.conn.scheme;
 
 import java.util.Locale;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.util.Args;
 import org.apache.http.util.LangUtils;
 
@@ -50,7 +51,7 @@ import org.apache.http.util.LangUtils;
  * @deprecated (4.3) use {@link org.apache.http.conn.SchemePortResolver} for default port
  * resolution and {@link org.apache.http.config.Registry} for socket factory lookups.
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 @Deprecated
 public final class Scheme {
 

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/scheme/SchemeRegistry.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/scheme/SchemeRegistry.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/scheme/SchemeRegistry.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/scheme/SchemeRegistry.java Sat Nov 19 16:40:54 2016
@@ -32,7 +32,8 @@ import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.http.HttpHost;
-import org.apache.http.annotation.ThreadSafe;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.util.Args;
 
 /**
@@ -43,7 +44,7 @@ import org.apache.http.util.Args;
  *
  * @deprecated (4.3) use {@link org.apache.http.config.Registry}
  */
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE)
 @Deprecated
 public final class SchemeRegistry {
 

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/socket/PlainConnectionSocketFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/socket/PlainConnectionSocketFactory.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/socket/PlainConnectionSocketFactory.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/socket/PlainConnectionSocketFactory.java Sat Nov 19 16:40:54 2016
@@ -32,7 +32,8 @@ import java.net.InetSocketAddress;
 import java.net.Socket;
 
 import org.apache.http.HttpHost;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.protocol.HttpContext;
 
 /**
@@ -40,7 +41,7 @@ import org.apache.http.protocol.HttpCont
  *
  * @since 4.3
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class PlainConnectionSocketFactory implements ConnectionSocketFactory {
 
     public static final PlainConnectionSocketFactory INSTANCE = new PlainConnectionSocketFactory();

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/AllowAllHostnameVerifier.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/AllowAllHostnameVerifier.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/AllowAllHostnameVerifier.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/AllowAllHostnameVerifier.java Sat Nov 19 16:40:54 2016
@@ -27,7 +27,8 @@
 
 package org.apache.http.conn.ssl;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 
 /**
  * The ALLOW_ALL HostnameVerifier essentially turns hostname verification
@@ -39,7 +40,7 @@ import org.apache.http.annotation.Immuta
  * @deprecated (4.4) Use {@link org.apache.http.conn.ssl.NoopHostnameVerifier}
  */
 @Deprecated
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class AllowAllHostnameVerifier extends AbstractVerifier {
 
     public static final AllowAllHostnameVerifier INSTANCE = new AllowAllHostnameVerifier();

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/BrowserCompatHostnameVerifier.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/BrowserCompatHostnameVerifier.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/BrowserCompatHostnameVerifier.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/BrowserCompatHostnameVerifier.java Sat Nov 19 16:40:54 2016
@@ -29,7 +29,8 @@ package org.apache.http.conn.ssl;
 
 import javax.net.ssl.SSLException;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 
 /**
  * The HostnameVerifier that works the same way as Curl and Firefox.
@@ -47,7 +48,7 @@ import org.apache.http.annotation.Immuta
  *
  * @deprecated (4.4) Use {@link org.apache.http.conn.ssl.DefaultHostnameVerifier}
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 @Deprecated
 public class BrowserCompatHostnameVerifier extends AbstractVerifier {
 

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/DefaultHostnameVerifier.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/DefaultHostnameVerifier.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/DefaultHostnameVerifier.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/DefaultHostnameVerifier.java Sat Nov 19 16:40:54 2016
@@ -51,7 +51,8 @@ import javax.security.auth.x500.X500Prin
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.conn.util.DomainType;
 import org.apache.http.conn.util.InetAddressUtils;
 import org.apache.http.conn.util.PublicSuffixMatcher;
@@ -61,7 +62,7 @@ import org.apache.http.conn.util.PublicS
  *
  * @since 4.4
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL)
 public final class DefaultHostnameVerifier implements HostnameVerifier {
 
     enum TYPE { IPv4, IPv6, DNS }

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/NoopHostnameVerifier.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/NoopHostnameVerifier.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/NoopHostnameVerifier.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/NoopHostnameVerifier.java Sat Nov 19 16:40:54 2016
@@ -30,7 +30,8 @@ package org.apache.http.conn.ssl;
 import javax.net.ssl.HostnameVerifier;
 import javax.net.ssl.SSLSession;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 
 /**
  * The NO_OP HostnameVerifier essentially turns hostname verification
@@ -38,7 +39,7 @@ import org.apache.http.annotation.Immuta
  *
  * @since 4.4
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class NoopHostnameVerifier implements HostnameVerifier {
 
     public static final NoopHostnameVerifier INSTANCE = new NoopHostnameVerifier();

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/SSLConnectionSocketFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/SSLConnectionSocketFactory.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/SSLConnectionSocketFactory.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/SSLConnectionSocketFactory.java Sat Nov 19 16:40:54 2016
@@ -50,7 +50,8 @@ import javax.security.auth.x500.X500Prin
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.http.HttpHost;
-import org.apache.http.annotation.ThreadSafe;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.conn.socket.LayeredConnectionSocketFactory;
 import org.apache.http.conn.util.PublicSuffixMatcherLoader;
 import org.apache.http.protocol.HttpContext;
@@ -133,7 +134,8 @@ import org.apache.http.util.TextUtils;
  *
  * @since 4.3
  */
-@ThreadSafe @SuppressWarnings("deprecation")
+@Contract(threading = ThreadingBehavior.SAFE)
+@SuppressWarnings("deprecation")
 public class SSLConnectionSocketFactory implements LayeredConnectionSocketFactory {
 
     public static final String TLS   = "TLS";

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/StrictHostnameVerifier.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/StrictHostnameVerifier.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/StrictHostnameVerifier.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/StrictHostnameVerifier.java Sat Nov 19 16:40:54 2016
@@ -29,7 +29,8 @@ package org.apache.http.conn.ssl;
 
 import javax.net.ssl.SSLException;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 
 /**
  * The Strict HostnameVerifier works the same way as Sun Java 1.4, Sun
@@ -53,7 +54,7 @@ import org.apache.http.annotation.Immuta
  *
  * @deprecated (4.4) Use {@link org.apache.http.conn.ssl.DefaultHostnameVerifier}
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 @Deprecated
 public class StrictHostnameVerifier extends AbstractVerifier {
 

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/util/InetAddressUtils.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/util/InetAddressUtils.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/util/InetAddressUtils.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/util/InetAddressUtils.java Sat Nov 19 16:40:54 2016
@@ -29,14 +29,11 @@ package org.apache.http.conn.util;
 
 import java.util.regex.Pattern;
 
-import org.apache.http.annotation.Immutable;
-
 /**
  * A collection of utilities relating to InetAddresses.
  *
  * @since 4.0
  */
-@Immutable
 public class InetAddressUtils {
 
     private InetAddressUtils() {

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/util/PublicSuffixList.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/util/PublicSuffixList.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/util/PublicSuffixList.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/util/PublicSuffixList.java Sat Nov 19 16:40:54 2016
@@ -29,7 +29,8 @@ package org.apache.http.conn.util;
 import java.util.Collections;
 import java.util.List;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.util.Args;
 
 /**
@@ -41,7 +42,7 @@ import org.apache.http.util.Args;
  *
  * @since 4.4
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public final class PublicSuffixList {
 
     private final DomainType type;

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/util/PublicSuffixListParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/util/PublicSuffixListParser.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/util/PublicSuffixListParser.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/util/PublicSuffixListParser.java Sat Nov 19 16:40:54 2016
@@ -32,7 +32,8 @@ import java.io.Reader;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 
 /**
  * Parses the list from <a href="http://publicsuffix.org/">publicsuffix.org</a>
@@ -40,7 +41,7 @@ import org.apache.http.annotation.Immuta
  *
  * @since 4.4
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public final class PublicSuffixListParser {
 
     public PublicSuffixListParser() {

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/util/PublicSuffixMatcher.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/util/PublicSuffixMatcher.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/util/PublicSuffixMatcher.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/util/PublicSuffixMatcher.java Sat Nov 19 16:40:54 2016
@@ -33,7 +33,8 @@ import java.util.Locale;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
-import org.apache.http.annotation.ThreadSafe;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.util.Args;
 
 /**
@@ -46,7 +47,7 @@ import org.apache.http.util.Args;
  *
  * @since 4.4
  */
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE)
 public final class PublicSuffixMatcher {
 
     private final Map<String, DomainType> rules;

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/util/PublicSuffixMatcherLoader.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/util/PublicSuffixMatcherLoader.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/util/PublicSuffixMatcherLoader.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/util/PublicSuffixMatcherLoader.java Sat Nov 19 16:40:54 2016
@@ -38,7 +38,8 @@ import java.util.List;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.http.Consts;
-import org.apache.http.annotation.ThreadSafe;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.util.Args;
 
 /**
@@ -46,7 +47,7 @@ import org.apache.http.util.Args;
  *
  * @since 4.4
  */
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE)
 public final class PublicSuffixMatcherLoader {
 
     private static PublicSuffixMatcher load(final InputStream in) throws IOException {

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/cookie/CookieIdentityComparator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/cookie/CookieIdentityComparator.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/cookie/CookieIdentityComparator.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/cookie/CookieIdentityComparator.java Sat Nov 19 16:40:54 2016
@@ -30,7 +30,8 @@ package org.apache.http.cookie;
 import java.io.Serializable;
 import java.util.Comparator;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 
 /**
  * This cookie comparator can be used to compare identity of cookies.
@@ -40,7 +41,7 @@ import org.apache.http.annotation.Immuta
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class CookieIdentityComparator implements Serializable, Comparator<Cookie> {
 
     private static final long serialVersionUID = 4466565437490631532L;

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/cookie/CookieOrigin.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/cookie/CookieOrigin.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/cookie/CookieOrigin.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/cookie/CookieOrigin.java Sat Nov 19 16:40:54 2016
@@ -28,7 +28,8 @@ package org.apache.http.cookie;
 
 import java.util.Locale;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.util.Args;
 import org.apache.http.util.TextUtils;
 
@@ -38,7 +39,7 @@ import org.apache.http.util.TextUtils;
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public final class CookieOrigin {
 
     private final String host;

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/cookie/CookiePathComparator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/cookie/CookiePathComparator.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/cookie/CookiePathComparator.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/cookie/CookiePathComparator.java Sat Nov 19 16:40:54 2016
@@ -30,7 +30,8 @@ package org.apache.http.cookie;
 import java.io.Serializable;
 import java.util.Comparator;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 
 /**
  * This cookie comparator ensures that multiple cookies satisfying
@@ -47,7 +48,7 @@ import org.apache.http.annotation.Immuta
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class CookiePathComparator implements Serializable, Comparator<Cookie> {
 
     public static final CookiePathComparator INSTANCE = new CookiePathComparator();

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/cookie/CookiePriorityComparator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/cookie/CookiePriorityComparator.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/cookie/CookiePriorityComparator.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/cookie/CookiePriorityComparator.java Sat Nov 19 16:40:54 2016
@@ -30,7 +30,8 @@ package org.apache.http.cookie;
 import java.util.Comparator;
 import java.util.Date;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.impl.cookie.BasicClientCookie;
 
 /**
@@ -40,7 +41,7 @@ import org.apache.http.impl.cookie.Basic
  *
  * @since 4.4
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class CookiePriorityComparator implements Comparator<Cookie> {
 
     public static final CookiePriorityComparator INSTANCE = new CookiePriorityComparator();

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/cookie/CookieRestrictionViolationException.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/cookie/CookieRestrictionViolationException.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/cookie/CookieRestrictionViolationException.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/cookie/CookieRestrictionViolationException.java Sat Nov 19 16:40:54 2016
@@ -27,15 +27,12 @@
 
 package org.apache.http.cookie;
 
-import org.apache.http.annotation.Immutable;
-
 /**
  * Signals that a cookie violates a restriction imposed by the cookie
  * specification.
  *
  * @since 4.1
  */
-@Immutable
 public class CookieRestrictionViolationException extends MalformedCookieException {
 
     private static final long serialVersionUID = 7371235577078589013L;

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/cookie/CookieSpecRegistry.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/cookie/CookieSpecRegistry.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/cookie/CookieSpecRegistry.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/cookie/CookieSpecRegistry.java Sat Nov 19 16:40:54 2016
@@ -34,7 +34,8 @@ import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.http.HttpRequest;
-import org.apache.http.annotation.ThreadSafe;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.config.Lookup;
 import org.apache.http.params.HttpParams;
 import org.apache.http.protocol.ExecutionContext;
@@ -50,7 +51,7 @@ import org.apache.http.util.Args;
  *
  * @deprecated (4.3) use {@link org.apache.http.config.Registry}.
  */
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE)
 @Deprecated
 public final class CookieSpecRegistry implements Lookup<CookieSpecProvider> {
 

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/cookie/MalformedCookieException.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/cookie/MalformedCookieException.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/cookie/MalformedCookieException.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/cookie/MalformedCookieException.java Sat Nov 19 16:40:54 2016
@@ -28,7 +28,6 @@
 package org.apache.http.cookie;
 
 import org.apache.http.ProtocolException;
-import org.apache.http.annotation.Immutable;
 
 /**
  * Signals that a cookie is in some way invalid or illegal in a given
@@ -37,7 +36,6 @@ import org.apache.http.annotation.Immuta
  *
  * @since 4.0
  */
-@Immutable
 public class MalformedCookieException extends ProtocolException {
 
     private static final long serialVersionUID = -6695462944287282185L;

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/AuthSchemeBase.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/AuthSchemeBase.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/AuthSchemeBase.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/AuthSchemeBase.java Sat Nov 19 16:40:54 2016
@@ -31,7 +31,6 @@ import java.util.Locale;
 import org.apache.http.FormattedHeader;
 import org.apache.http.Header;
 import org.apache.http.HttpRequest;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.auth.AUTH;
 import org.apache.http.auth.AuthenticationException;
 import org.apache.http.auth.ChallengeState;
@@ -53,7 +52,6 @@ import org.apache.http.util.CharArrayBuf
  *
  * @since 4.0
  */
-@NotThreadSafe
 public abstract class AuthSchemeBase implements ContextAwareAuthScheme {
 
     protected ChallengeState challengeState;

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/BasicScheme.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/BasicScheme.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/BasicScheme.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/BasicScheme.java Sat Nov 19 16:40:54 2016
@@ -32,7 +32,6 @@ import org.apache.commons.codec.binary.B
 import org.apache.http.Consts;
 import org.apache.http.Header;
 import org.apache.http.HttpRequest;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.auth.AUTH;
 import org.apache.http.auth.AuthenticationException;
 import org.apache.http.auth.ChallengeState;
@@ -50,7 +49,6 @@ import org.apache.http.util.EncodingUtil
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class BasicScheme extends RFC2617Scheme {
 
     private static final long serialVersionUID = -1931571557597830536L;

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/BasicSchemeFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/BasicSchemeFactory.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/BasicSchemeFactory.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/BasicSchemeFactory.java Sat Nov 19 16:40:54 2016
@@ -29,7 +29,8 @@ package org.apache.http.impl.auth;
 
 import java.nio.charset.Charset;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.auth.AuthScheme;
 import org.apache.http.auth.AuthSchemeFactory;
 import org.apache.http.auth.AuthSchemeProvider;
@@ -42,7 +43,7 @@ import org.apache.http.protocol.HttpCont
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 @SuppressWarnings("deprecation")
 public class BasicSchemeFactory implements AuthSchemeFactory, AuthSchemeProvider {
 

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/DigestScheme.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/DigestScheme.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/DigestScheme.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/DigestScheme.java Sat Nov 19 16:40:54 2016
@@ -43,7 +43,6 @@ import org.apache.http.Header;
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpEntityEnclosingRequest;
 import org.apache.http.HttpRequest;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.auth.AUTH;
 import org.apache.http.auth.AuthenticationException;
 import org.apache.http.auth.ChallengeState;
@@ -72,7 +71,6 @@ import org.apache.http.util.EncodingUtil
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class DigestScheme extends RFC2617Scheme {
 
     private static final long serialVersionUID = 3883908186234566916L;

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/DigestSchemeFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/DigestSchemeFactory.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/DigestSchemeFactory.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/DigestSchemeFactory.java Sat Nov 19 16:40:54 2016
@@ -29,7 +29,8 @@ package org.apache.http.impl.auth;
 
 import java.nio.charset.Charset;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.auth.AuthScheme;
 import org.apache.http.auth.AuthSchemeFactory;
 import org.apache.http.auth.AuthSchemeProvider;
@@ -42,7 +43,7 @@ import org.apache.http.protocol.HttpCont
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 @SuppressWarnings("deprecation")
 public class DigestSchemeFactory implements AuthSchemeFactory, AuthSchemeProvider {
 

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/GGSSchemeBase.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/GGSSchemeBase.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/GGSSchemeBase.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/GGSSchemeBase.java Sat Nov 19 16:40:54 2016
@@ -35,7 +35,6 @@ import org.apache.commons.logging.LogFac
 import org.apache.http.Header;
 import org.apache.http.HttpHost;
 import org.apache.http.HttpRequest;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.auth.AUTH;
 import org.apache.http.auth.AuthenticationException;
 import org.apache.http.auth.Credentials;
@@ -58,7 +57,6 @@ import org.ietf.jgss.Oid;
 /**
  * @since 4.2
  */
-@NotThreadSafe
 public abstract class GGSSchemeBase extends AuthSchemeBase {
 
     enum State {

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/KerberosScheme.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/KerberosScheme.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/KerberosScheme.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/KerberosScheme.java Sat Nov 19 16:40:54 2016
@@ -28,7 +28,6 @@ package org.apache.http.impl.auth;
 
 import org.apache.http.Header;
 import org.apache.http.HttpRequest;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.auth.AuthenticationException;
 import org.apache.http.auth.Credentials;
 import org.apache.http.protocol.HttpContext;
@@ -41,7 +40,6 @@ import org.ietf.jgss.Oid;
  *
  * @since 4.2
  */
-@NotThreadSafe
 public class KerberosScheme extends GGSSchemeBase {
 
     private static final String KERBEROS_OID = "1.2.840.113554.1.2.2";

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/KerberosSchemeFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/KerberosSchemeFactory.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/KerberosSchemeFactory.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/KerberosSchemeFactory.java Sat Nov 19 16:40:54 2016
@@ -26,7 +26,8 @@
  */
 package org.apache.http.impl.auth;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.auth.AuthScheme;
 import org.apache.http.auth.AuthSchemeFactory;
 import org.apache.http.auth.AuthSchemeProvider;
@@ -39,7 +40,7 @@ import org.apache.http.protocol.HttpCont
  *
  * @since 4.2
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 @SuppressWarnings("deprecation")
 public class KerberosSchemeFactory implements AuthSchemeFactory, AuthSchemeProvider {
 

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineException.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineException.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineException.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineException.java Sat Nov 19 16:40:54 2016
@@ -26,7 +26,6 @@
  */
 package org.apache.http.impl.auth;
 
-import org.apache.http.annotation.Immutable;
 import org.apache.http.auth.AuthenticationException;
 
 /**
@@ -35,7 +34,6 @@ import org.apache.http.auth.Authenticati
  *
  * @since 4.0
  */
-@Immutable
 public class NTLMEngineException extends AuthenticationException {
 
     private static final long serialVersionUID = 6027981323731768824L;

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java Sat Nov 19 16:40:54 2016
@@ -38,7 +38,6 @@ import javax.crypto.spec.SecretKeySpec;
 
 import org.apache.commons.codec.binary.Base64;
 import org.apache.http.Consts;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.util.CharsetUtils;
 import org.apache.http.util.EncodingUtils;
 
@@ -48,7 +47,6 @@ import org.apache.http.util.EncodingUtil
  *
  * @since 4.1
  */
-@NotThreadSafe
 final class NTLMEngineImpl implements NTLMEngine {
 
     /** Unicode encoding */

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/NTLMScheme.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/NTLMScheme.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/NTLMScheme.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/NTLMScheme.java Sat Nov 19 16:40:54 2016
@@ -28,7 +28,6 @@ package org.apache.http.impl.auth;
 
 import org.apache.http.Header;
 import org.apache.http.HttpRequest;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.auth.AUTH;
 import org.apache.http.auth.AuthenticationException;
 import org.apache.http.auth.Credentials;
@@ -45,7 +44,6 @@ import org.apache.http.util.CharArrayBuf
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class NTLMScheme extends AuthSchemeBase {
 
     enum State {

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/NTLMSchemeFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/NTLMSchemeFactory.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/NTLMSchemeFactory.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/NTLMSchemeFactory.java Sat Nov 19 16:40:54 2016
@@ -27,7 +27,8 @@
 
 package org.apache.http.impl.auth;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.auth.AuthScheme;
 import org.apache.http.auth.AuthSchemeFactory;
 import org.apache.http.auth.AuthSchemeProvider;
@@ -41,7 +42,7 @@ import org.apache.http.protocol.HttpCont
  *
  * @since 4.1
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 @SuppressWarnings("deprecation")
 public class NTLMSchemeFactory implements AuthSchemeFactory, AuthSchemeProvider {
 

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/RFC2617Scheme.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/RFC2617Scheme.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/RFC2617Scheme.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/RFC2617Scheme.java Sat Nov 19 16:40:54 2016
@@ -39,7 +39,6 @@ import java.util.Map;
 import org.apache.http.Consts;
 import org.apache.http.HeaderElement;
 import org.apache.http.HttpRequest;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.auth.ChallengeState;
 import org.apache.http.auth.MalformedChallengeException;
 import org.apache.http.auth.params.AuthPNames;
@@ -57,7 +56,6 @@ import org.apache.http.util.CharsetUtils
  * @since 4.0
  */
 @SuppressWarnings("deprecation")
-@NotThreadSafe // AuthSchemeBase, params
 public abstract class RFC2617Scheme extends AuthSchemeBase implements Serializable {
 
     private static final long serialVersionUID = -2845454858205884623L;

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/SPNegoScheme.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/SPNegoScheme.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/SPNegoScheme.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/SPNegoScheme.java Sat Nov 19 16:40:54 2016
@@ -28,7 +28,6 @@ package org.apache.http.impl.auth;
 
 import org.apache.http.Header;
 import org.apache.http.HttpRequest;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.auth.AuthenticationException;
 import org.apache.http.auth.Credentials;
 import org.apache.http.protocol.HttpContext;
@@ -42,7 +41,6 @@ import org.ietf.jgss.Oid;
  *
  * @since 4.2
  */
-@NotThreadSafe
 public class SPNegoScheme extends GGSSchemeBase {
 
     private static final String SPNEGO_OID = "1.3.6.1.5.5.2";

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/SPNegoSchemeFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/SPNegoSchemeFactory.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/SPNegoSchemeFactory.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/SPNegoSchemeFactory.java Sat Nov 19 16:40:54 2016
@@ -26,7 +26,8 @@
  */
 package org.apache.http.impl.auth;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.auth.AuthScheme;
 import org.apache.http.auth.AuthSchemeFactory;
 import org.apache.http.auth.AuthSchemeProvider;
@@ -39,7 +40,7 @@ import org.apache.http.protocol.HttpCont
  *
  * @since 4.2
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 @SuppressWarnings("deprecation")
 public class SPNegoSchemeFactory implements AuthSchemeFactory, AuthSchemeProvider {
 

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/UnsupportedDigestAlgorithmException.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/UnsupportedDigestAlgorithmException.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/UnsupportedDigestAlgorithmException.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/UnsupportedDigestAlgorithmException.java Sat Nov 19 16:40:54 2016
@@ -26,8 +26,6 @@
  */
 package org.apache.http.impl.auth;
 
-import org.apache.http.annotation.Immutable;
-
 /**
  * Authentication credentials required to respond to a authentication
  * challenge are invalid
@@ -35,7 +33,6 @@ import org.apache.http.annotation.Immuta
  *
  * @since 4.0
  */
-@Immutable
 public class UnsupportedDigestAlgorithmException extends RuntimeException {
 
     private static final long serialVersionUID = 319558534317118022L;

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/AbstractResponseHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/AbstractResponseHandler.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/AbstractResponseHandler.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/AbstractResponseHandler.java Sat Nov 19 16:40:54 2016
@@ -32,7 +32,8 @@ import java.io.IOException;
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpResponse;
 import org.apache.http.StatusLine;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.client.HttpResponseException;
 import org.apache.http.client.ResponseHandler;
 import org.apache.http.util.EntityUtils;
@@ -50,7 +51,7 @@ import org.apache.http.util.EntityUtils;
  *
  * @since 4.4
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public abstract class AbstractResponseHandler<T> implements ResponseHandler<T> {
 
     /**

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/AuthenticationStrategyImpl.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/AuthenticationStrategyImpl.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/AuthenticationStrategyImpl.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/AuthenticationStrategyImpl.java Sat Nov 19 16:40:54 2016
@@ -43,7 +43,8 @@ import org.apache.http.FormattedHeader;
 import org.apache.http.Header;
 import org.apache.http.HttpHost;
 import org.apache.http.HttpResponse;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.auth.AuthOption;
 import org.apache.http.auth.AuthScheme;
 import org.apache.http.auth.AuthSchemeProvider;
@@ -62,7 +63,7 @@ import org.apache.http.protocol.HttpCont
 import org.apache.http.util.Args;
 import org.apache.http.util.CharArrayBuffer;
 
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 abstract class AuthenticationStrategyImpl implements AuthenticationStrategy {
 
     private final Log log = LogFactory.getLog(getClass());

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/BasicAuthCache.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/BasicAuthCache.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/BasicAuthCache.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/BasicAuthCache.java Sat Nov 19 16:40:54 2016
@@ -38,7 +38,8 @@ import java.util.concurrent.ConcurrentHa
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.http.HttpHost;
-import org.apache.http.annotation.ThreadSafe;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.auth.AuthScheme;
 import org.apache.http.client.AuthCache;
 import org.apache.http.conn.SchemePortResolver;
@@ -56,7 +57,7 @@ import org.apache.http.util.Args;
  *
  * @since 4.1
  */
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE)
 public class BasicAuthCache implements AuthCache {
 
     private final Log log = LogFactory.getLog(getClass());

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/BasicCookieStore.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/BasicCookieStore.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/BasicCookieStore.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/BasicCookieStore.java Sat Nov 19 16:40:54 2016
@@ -33,8 +33,8 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.TreeSet;
 
-import org.apache.http.annotation.GuardedBy;
-import org.apache.http.annotation.ThreadSafe;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.client.CookieStore;
 import org.apache.http.cookie.Cookie;
 import org.apache.http.cookie.CookieIdentityComparator;
@@ -45,12 +45,11 @@ import org.apache.http.cookie.CookieIden
  *
  * @since 4.0
  */
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE)
 public class BasicCookieStore implements CookieStore, Serializable {
 
     private static final long serialVersionUID = -7581093305228232025L;
 
-    @GuardedBy("this")
     private final TreeSet<Cookie> cookies;
 
     public BasicCookieStore() {

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/BasicCredentialsProvider.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/BasicCredentialsProvider.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/BasicCredentialsProvider.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/BasicCredentialsProvider.java Sat Nov 19 16:40:54 2016
@@ -29,7 +29,8 @@ package org.apache.http.impl.client;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
-import org.apache.http.annotation.ThreadSafe;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.auth.AuthScope;
 import org.apache.http.auth.Credentials;
 import org.apache.http.client.CredentialsProvider;
@@ -40,7 +41,7 @@ import org.apache.http.util.Args;
  *
  * @since 4.0
  */
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE)
 public class BasicCredentialsProvider implements CredentialsProvider {
 
     private final ConcurrentHashMap<AuthScope, Credentials> credMap;

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/BasicResponseHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/BasicResponseHandler.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/BasicResponseHandler.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/BasicResponseHandler.java Sat Nov 19 16:40:54 2016
@@ -31,7 +31,8 @@ import java.io.IOException;
 
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpResponse;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.client.HttpResponseException;
 import org.apache.http.util.EntityUtils;
 
@@ -48,7 +49,7 @@ import org.apache.http.util.EntityUtils;
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class BasicResponseHandler extends AbstractResponseHandler<String> {
 
     /**

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/CloseableHttpClient.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/CloseableHttpClient.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/CloseableHttpClient.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/CloseableHttpClient.java Sat Nov 19 16:40:54 2016
@@ -36,7 +36,8 @@ import org.apache.commons.logging.LogFac
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpHost;
 import org.apache.http.HttpRequest;
-import org.apache.http.annotation.ThreadSafe;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.client.ClientProtocolException;
 import org.apache.http.client.HttpClient;
 import org.apache.http.client.ResponseHandler;
@@ -52,7 +53,7 @@ import org.apache.http.util.EntityUtils;
  *
  * @since 4.3
  */
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE)
 public abstract class CloseableHttpClient implements HttpClient, Closeable {
 
     private final Log log = LogFactory.getLog(getClass());

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultConnectionKeepAliveStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultConnectionKeepAliveStrategy.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultConnectionKeepAliveStrategy.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultConnectionKeepAliveStrategy.java Sat Nov 19 16:40:54 2016
@@ -29,7 +29,8 @@ package org.apache.http.impl.client;
 import org.apache.http.HeaderElement;
 import org.apache.http.HeaderElementIterator;
 import org.apache.http.HttpResponse;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.conn.ConnectionKeepAliveStrategy;
 import org.apache.http.message.BasicHeaderElementIterator;
 import org.apache.http.protocol.HTTP;
@@ -45,7 +46,7 @@ import org.apache.http.util.Args;
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class DefaultConnectionKeepAliveStrategy implements ConnectionKeepAliveStrategy {
 
     public static final DefaultConnectionKeepAliveStrategy INSTANCE = new DefaultConnectionKeepAliveStrategy();

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultHttpRequestRetryHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultHttpRequestRetryHandler.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultHttpRequestRetryHandler.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultHttpRequestRetryHandler.java Sat Nov 19 16:40:54 2016
@@ -40,7 +40,8 @@ import javax.net.ssl.SSLException;
 
 import org.apache.http.HttpEntityEnclosingRequest;
 import org.apache.http.HttpRequest;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.client.HttpRequestRetryHandler;
 import org.apache.http.client.methods.HttpUriRequest;
 import org.apache.http.client.protocol.HttpClientContext;
@@ -52,7 +53,7 @@ import org.apache.http.util.Args;
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class DefaultHttpRequestRetryHandler implements HttpRequestRetryHandler {
 
     public static final DefaultHttpRequestRetryHandler INSTANCE = new DefaultHttpRequestRetryHandler();

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectStrategy.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectStrategy.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectStrategy.java Sat Nov 19 16:40:54 2016
@@ -39,7 +39,8 @@ import org.apache.http.HttpRequest;
 import org.apache.http.HttpResponse;
 import org.apache.http.HttpStatus;
 import org.apache.http.ProtocolException;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.client.CircularRedirectException;
 import org.apache.http.client.RedirectStrategy;
 import org.apache.http.client.config.RequestConfig;
@@ -70,7 +71,7 @@ import org.apache.http.util.TextUtils;
  * @see LaxRedirectStrategy
  * @since 4.1
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class DefaultRedirectStrategy implements RedirectStrategy {
 
     private final Log log = LogFactory.getLog(getClass());

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultServiceUnavailableRetryStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultServiceUnavailableRetryStrategy.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultServiceUnavailableRetryStrategy.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultServiceUnavailableRetryStrategy.java Sat Nov 19 16:40:54 2016
@@ -29,7 +29,8 @@ package org.apache.http.impl.client;
 
 import org.apache.http.HttpResponse;
 import org.apache.http.HttpStatus;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.client.ServiceUnavailableRetryStrategy;
 import org.apache.http.protocol.HttpContext;
 import org.apache.http.util.Args;
@@ -41,7 +42,7 @@ import org.apache.http.util.Args;
  *
  * @since 4.2
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class DefaultServiceUnavailableRetryStrategy implements ServiceUnavailableRetryStrategy {
 
     /**

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultUserTokenHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultUserTokenHandler.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultUserTokenHandler.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultUserTokenHandler.java Sat Nov 19 16:40:54 2016
@@ -31,7 +31,8 @@ import java.security.Principal;
 import javax.net.ssl.SSLSession;
 
 import org.apache.http.HttpConnection;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.auth.AuthScheme;
 import org.apache.http.auth.AuthState;
 import org.apache.http.auth.Credentials;
@@ -54,7 +55,7 @@ import org.apache.http.protocol.HttpCont
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class DefaultUserTokenHandler implements UserTokenHandler {
 
     public static final DefaultUserTokenHandler INSTANCE = new DefaultUserTokenHandler();

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/EntityEnclosingRequestWrapper.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/EntityEnclosingRequestWrapper.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/EntityEnclosingRequestWrapper.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/EntityEnclosingRequestWrapper.java Sat Nov 19 16:40:54 2016
@@ -35,7 +35,6 @@ import org.apache.http.Header;
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpEntityEnclosingRequest;
 import org.apache.http.ProtocolException;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.entity.HttpEntityWrapper;
 import org.apache.http.protocol.HTTP;
 
@@ -53,7 +52,6 @@ import org.apache.http.protocol.HTTP;
  * @deprecated (4.3) do not use.
  */
 @Deprecated
-@NotThreadSafe // e.g. [gs]etEntity()
 public class EntityEnclosingRequestWrapper extends RequestWrapper
     implements HttpEntityEnclosingRequest {
 

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/FutureRequestExecutionService.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/FutureRequestExecutionService.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/FutureRequestExecutionService.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/FutureRequestExecutionService.java Sat Nov 19 16:40:54 2016
@@ -31,7 +31,8 @@ import java.io.IOException;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.atomic.AtomicBoolean;
 
-import org.apache.http.annotation.ThreadSafe;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.client.HttpClient;
 import org.apache.http.client.ResponseHandler;
 import org.apache.http.client.methods.HttpUriRequest;
@@ -42,7 +43,7 @@ import org.apache.http.protocol.HttpCont
  * HttpAsyncClientWithFuture wraps calls to execute with a {@link HttpRequestFutureTask}
  * and schedules them using the provided executor service. Scheduled calls may be cancelled.
  */
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE)
 public class FutureRequestExecutionService implements Closeable {
 
     private final HttpClient httpclient;

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java Sat Nov 19 16:40:54 2016
@@ -47,7 +47,6 @@ import org.apache.http.Header;
 import org.apache.http.HttpHost;
 import org.apache.http.HttpRequestInterceptor;
 import org.apache.http.HttpResponseInterceptor;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.auth.AuthSchemeProvider;
 import org.apache.http.client.AuthenticationStrategy;
 import org.apache.http.client.BackoffManager;
@@ -153,7 +152,6 @@ import org.apache.http.util.VersionInfo;
  *
  * @since 4.3
  */
-@NotThreadSafe
 public class HttpClientBuilder {
 
     private HttpRequestExecutor requestExec;

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/HttpClients.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/HttpClients.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/HttpClients.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/HttpClients.java Sat Nov 19 16:40:54 2016
@@ -27,7 +27,6 @@
 
 package org.apache.http.impl.client;
 
-import org.apache.http.annotation.Immutable;
 import org.apache.http.conn.HttpClientConnectionManager;
 import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
 
@@ -35,7 +34,6 @@ import org.apache.http.impl.conn.Pooling
  * Factory methods for {@link CloseableHttpClient} instances.
  * @since 4.3
  */
-@Immutable
 public class HttpClients {
 
     private HttpClients() {

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/InternalHttpClient.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/InternalHttpClient.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/InternalHttpClient.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/InternalHttpClient.java Sat Nov 19 16:40:54 2016
@@ -37,7 +37,8 @@ import org.apache.commons.logging.LogFac
 import org.apache.http.HttpException;
 import org.apache.http.HttpHost;
 import org.apache.http.HttpRequest;
-import org.apache.http.annotation.ThreadSafe;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.auth.AuthSchemeProvider;
 import org.apache.http.auth.AuthState;
 import org.apache.http.client.ClientProtocolException;
@@ -72,7 +73,7 @@ import org.apache.http.util.Args;
  *
  * @since 4.3
  */
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
 @SuppressWarnings("deprecation")
 class InternalHttpClient extends CloseableHttpClient implements Configurable {
 

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/LaxRedirectStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/LaxRedirectStrategy.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/LaxRedirectStrategy.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/LaxRedirectStrategy.java Sat Nov 19 16:40:54 2016
@@ -27,7 +27,8 @@
 
 package org.apache.http.impl.client;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.client.methods.HttpDelete;
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.client.methods.HttpHead;
@@ -41,7 +42,7 @@ import org.apache.http.client.methods.Ht
  *
  * @since 4.2
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class LaxRedirectStrategy extends DefaultRedirectStrategy {
 
     public static final LaxRedirectStrategy INSTANCE = new LaxRedirectStrategy();

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/MinimalHttpClient.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/MinimalHttpClient.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/MinimalHttpClient.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/MinimalHttpClient.java Sat Nov 19 16:40:54 2016
@@ -33,7 +33,8 @@ import java.util.concurrent.TimeUnit;
 import org.apache.http.HttpException;
 import org.apache.http.HttpHost;
 import org.apache.http.HttpRequest;
-import org.apache.http.annotation.ThreadSafe;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.client.ClientProtocolException;
 import org.apache.http.client.config.RequestConfig;
 import org.apache.http.client.methods.CloseableHttpResponse;
@@ -61,7 +62,7 @@ import org.apache.http.util.Args;
  *
  * @since 4.3
  */
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
 @SuppressWarnings("deprecation")
 class MinimalHttpClient extends CloseableHttpClient {
 

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/NoopUserTokenHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/NoopUserTokenHandler.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/NoopUserTokenHandler.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/NoopUserTokenHandler.java Sat Nov 19 16:40:54 2016
@@ -26,7 +26,8 @@
  */
 package org.apache.http.impl.client;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.client.UserTokenHandler;
 import org.apache.http.protocol.HttpContext;
 
@@ -35,7 +36,7 @@ import org.apache.http.protocol.HttpCont
  *
  * @since 4.3
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class NoopUserTokenHandler implements UserTokenHandler {
 
     public static final NoopUserTokenHandler INSTANCE = new NoopUserTokenHandler();

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/ProxyAuthenticationStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/ProxyAuthenticationStrategy.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/ProxyAuthenticationStrategy.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/ProxyAuthenticationStrategy.java Sat Nov 19 16:40:54 2016
@@ -30,7 +30,8 @@ package org.apache.http.impl.client;
 import java.util.Collection;
 
 import org.apache.http.HttpStatus;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.auth.AUTH;
 import org.apache.http.client.config.RequestConfig;
 
@@ -40,7 +41,7 @@ import org.apache.http.client.config.Req
  *
  * @since 4.2
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class ProxyAuthenticationStrategy extends AuthenticationStrategyImpl {
 
     public static final ProxyAuthenticationStrategy INSTANCE = new ProxyAuthenticationStrategy();

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/RedirectLocations.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/RedirectLocations.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/RedirectLocations.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/RedirectLocations.java Sat Nov 19 16:40:54 2016
@@ -35,15 +35,12 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
 
-import org.apache.http.annotation.NotThreadSafe;
-
 /**
  * This class represents a collection of {@link java.net.URI}s used
  * as redirect locations.
  *
  * @since 4.0
  */
-@NotThreadSafe // HashSet/ArrayList are not synch.
 public class RedirectLocations extends AbstractList<Object> {
 
     private final Set<URI> unique;

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/RequestWrapper.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/RequestWrapper.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/RequestWrapper.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/RequestWrapper.java Sat Nov 19 16:40:54 2016
@@ -34,7 +34,6 @@ import org.apache.http.HttpRequest;
 import org.apache.http.ProtocolException;
 import org.apache.http.ProtocolVersion;
 import org.apache.http.RequestLine;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.client.methods.HttpUriRequest;
 import org.apache.http.message.AbstractHttpMessage;
 import org.apache.http.message.BasicRequestLine;
@@ -54,7 +53,6 @@ import org.apache.http.util.Args;
  *
  * @deprecated (4.3) do not use.
  */
-@NotThreadSafe
 @Deprecated
 public class RequestWrapper extends AbstractHttpMessage implements HttpUriRequest {
 

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/StandardHttpRequestRetryHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/StandardHttpRequestRetryHandler.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/StandardHttpRequestRetryHandler.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/StandardHttpRequestRetryHandler.java Sat Nov 19 16:40:54 2016
@@ -32,7 +32,8 @@ import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.http.HttpRequest;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 
 /**
  * {@link org.apache.http.client.HttpRequestRetryHandler} which assumes
@@ -45,7 +46,7 @@ import org.apache.http.annotation.Immuta
  *
  * @since 4.2
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class StandardHttpRequestRetryHandler extends DefaultHttpRequestRetryHandler {
 
     private final Map<String, Boolean> idempotentMethods;

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/SystemDefaultCredentialsProvider.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/SystemDefaultCredentialsProvider.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/SystemDefaultCredentialsProvider.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/SystemDefaultCredentialsProvider.java Sat Nov 19 16:40:54 2016
@@ -33,7 +33,8 @@ import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.http.HttpHost;
-import org.apache.http.annotation.ThreadSafe;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.auth.AuthScope;
 import org.apache.http.auth.Credentials;
 import org.apache.http.auth.NTCredentials;
@@ -48,7 +49,7 @@ import org.apache.http.util.Args;
  *
  * @since 4.3
  */
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE)
 public class SystemDefaultCredentialsProvider implements CredentialsProvider {
 
     private static final Map<String, String> SCHEME_MAP;

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/TargetAuthenticationStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/TargetAuthenticationStrategy.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/TargetAuthenticationStrategy.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/TargetAuthenticationStrategy.java Sat Nov 19 16:40:54 2016
@@ -30,7 +30,8 @@ package org.apache.http.impl.client;
 import java.util.Collection;
 
 import org.apache.http.HttpStatus;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.auth.AUTH;
 import org.apache.http.client.config.RequestConfig;
 
@@ -40,7 +41,7 @@ import org.apache.http.client.config.Req
  *
  * @since 4.2
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class TargetAuthenticationStrategy extends AuthenticationStrategyImpl {
 
     public static final TargetAuthenticationStrategy INSTANCE = new TargetAuthenticationStrategy();

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/conn/BasicHttpClientConnectionManager.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/conn/BasicHttpClientConnectionManager.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/conn/BasicHttpClientConnectionManager.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/conn/BasicHttpClientConnectionManager.java Sat Nov 19 16:40:54 2016
@@ -38,8 +38,8 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.http.HttpClientConnection;
 import org.apache.http.HttpHost;
-import org.apache.http.annotation.GuardedBy;
-import org.apache.http.annotation.ThreadSafe;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.config.ConnectionConfig;
 import org.apache.http.config.Lookup;
 import org.apache.http.config.Registry;
@@ -50,8 +50,8 @@ import org.apache.http.conn.DnsResolver;
 import org.apache.http.conn.HttpClientConnectionManager;
 import org.apache.http.conn.HttpClientConnectionOperator;
 import org.apache.http.conn.HttpConnectionFactory;
-import org.apache.http.conn.SchemePortResolver;
 import org.apache.http.conn.ManagedHttpClientConnection;
+import org.apache.http.conn.SchemePortResolver;
 import org.apache.http.conn.routing.HttpRoute;
 import org.apache.http.conn.socket.ConnectionSocketFactory;
 import org.apache.http.conn.socket.PlainConnectionSocketFactory;
@@ -79,7 +79,7 @@ import org.apache.http.util.LangUtils;
  *
  * @since 4.3
  */
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
 public class BasicHttpClientConnectionManager implements HttpClientConnectionManager, Closeable {
 
     private final Log log = LogFactory.getLog(getClass());
@@ -87,28 +87,13 @@ public class BasicHttpClientConnectionMa
     private final HttpClientConnectionOperator connectionOperator;
     private final HttpConnectionFactory<HttpRoute, ManagedHttpClientConnection> connFactory;
 
-    @GuardedBy("this")
     private ManagedHttpClientConnection conn;
-
-    @GuardedBy("this")
     private HttpRoute route;
-
-    @GuardedBy("this")
     private Object state;
-
-    @GuardedBy("this")
     private long updated;
-
-    @GuardedBy("this")
     private long expiry;
-
-    @GuardedBy("this")
     private boolean leased;
-
-    @GuardedBy("this")
     private SocketConfig socketConfig;
-
-    @GuardedBy("this")
     private ConnectionConfig connConfig;
 
     private final AtomicBoolean isShutdown;

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/conn/CPool.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/conn/CPool.java?rev=1770506&r1=1770505&r2=1770506&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/conn/CPool.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/conn/CPool.java Sat Nov 19 16:40:54 2016
@@ -31,7 +31,8 @@ import java.util.concurrent.atomic.Atomi
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.http.annotation.ThreadSafe;
+import org.apache.http.annotation.Contract;
+import org.apache.http.annotation.ThreadingBehavior;
 import org.apache.http.conn.ManagedHttpClientConnection;
 import org.apache.http.conn.routing.HttpRoute;
 import org.apache.http.pool.AbstractConnPool;
@@ -41,7 +42,7 @@ import org.apache.http.pool.PoolEntryCal
 /**
  * @since 4.3
  */
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE)
 class CPool extends AbstractConnPool<HttpRoute, ManagedHttpClientConnection, CPoolEntry> {
 
     private static final AtomicLong COUNTER = new AtomicLong();




Mime
View raw message