hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1747290 [3/4] - in /httpcomponents/httpcore/branches/4.4.x: ./ httpcore-nio/src/main/java-deprecated/org/apache/http/impl/nio/ httpcore-nio/src/main/java-deprecated/org/apache/http/impl/nio/ssl/ httpcore-nio/src/main/java-deprecated/org/ap...
Date Tue, 07 Jun 2016 18:24:12 GMT
Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/ProtocolVersion.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/ProtocolVersion.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/ProtocolVersion.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/ProtocolVersion.java Tue Jun  7 18:24:10 2016
@@ -29,7 +29,8 @@ package org.apache.http;
 
 import java.io.Serializable;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.ThreadingBehavior;
+import org.apache.http.annotation.Contract;
 import org.apache.http.util.Args;
 
 /**
@@ -44,7 +45,7 @@ import org.apache.http.util.Args;
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class ProtocolVersion implements Serializable, Cloneable {
 
     private static final long serialVersionUID = 8950662842175091068L;

Copied: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/Contract.java (from r1740279, httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/NotThreadSafe.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/Contract.java?p2=httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/Contract.java&p1=httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/NotThreadSafe.java&r1=1740279&r2=1747290&rev=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/NotThreadSafe.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/Contract.java Tue Jun  7 18:24:10 2016
@@ -33,18 +33,13 @@ import java.lang.annotation.RetentionPol
 import java.lang.annotation.Target;
 
 /**
- * The class to which this annotation is applied is not thread-safe.
- * This annotation primarily exists for clarifying the non-thread-safety of a class
- * that might otherwise be assumed to be thread-safe, despite the fact that it is a bad
- * idea to assume a class is thread-safe without good reason.
- * @see ThreadSafe
- * <p>
- * Based on code developed by Brian Goetz and Tim Peierls and concepts
- * published in 'Java Concurrency in Practice' by Brian Goetz, Tim Peierls,
- * Joshua Bloch, Joseph Bowbeer, David Holmes and Doug Lea.
+ * This annotation defines behavioral contract enforced at runtime by instances of annotated classes.
  */
 @Documented
 @Target(ElementType.TYPE)
-@Retention(RetentionPolicy.CLASS) // The original version used RUNTIME
-public @interface NotThreadSafe {
+@Retention(RetentionPolicy.CLASS)
+public @interface Contract {
+
+    ThreadingBehavior threading() default ThreadingBehavior.UNSAFE;
+
 }

Propchange: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/Contract.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/Contract.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/Contract.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/ThreadingBehavior.java (from r1740279, httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/ThreadSafe.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/ThreadingBehavior.java?p2=httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/ThreadingBehavior.java&p1=httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/ThreadSafe.java&r1=1740279&r2=1747290&rev=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/ThreadSafe.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/ThreadingBehavior.java Tue Jun  7 18:24:10 2016
@@ -26,26 +26,38 @@
  */
 package org.apache.http.annotation;
 
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
 /**
- * The class to which this annotation is applied is thread-safe.  This means that
- * no sequences of accesses (reads and writes to public fields, calls to public methods)
- * may put the object into an invalid state, regardless of the interleaving of those actions
- * by the runtime, and without requiring any additional synchronization or coordination on the
- * part of the caller.
- * @see NotThreadSafe
- * <p>
- * Based on code developed by Brian Goetz and Tim Peierls and concepts
- * published in 'Java Concurrency in Practice' by Brian Goetz, Tim Peierls,
- * Joshua Bloch, Joseph Bowbeer, David Holmes and Doug Lea.
+ Defines types of threading behavior enforced at runtime.
  */
-@Documented
-@Target(ElementType.TYPE)
-@Retention(RetentionPolicy.CLASS) // The original version used RUNTIME
-public @interface ThreadSafe {
+public enum ThreadingBehavior {
+
+    /**
+     * Instances of classes with the given contract are expected to be fully immutable
+     * and thread-safe.
+     */
+    IMMUTABLE,
+
+    /**
+     * Instances of classes with the given contract are expected to be immutable if their
+     * dependencies injected at construction time are immutable and are expected to be thread-safe
+     * if their dependencies are thread-safe.
+     */
+    IMMUTABLE_CONDITIONAL,
+
+    /**
+     * Instances of classes with the given contract are expected to be fully thread-safe.
+     */
+    SAFE,
+
+    /**
+     * Instances of classes with the given contract are expected to be thread-safe if their
+     * dependencies injected at construction time are thread-safe.
+     */
+    SAFE_CONDITIONAL,
+
+    /**
+     * Instances of classes with the given contract are expected to be non thread-safe.
+     */
+    UNSAFE
+
 }

Propchange: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/ThreadingBehavior.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/ThreadingBehavior.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/ThreadingBehavior.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/package-info.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/package-info.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/package-info.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/package-info.java Tue Jun  7 18:24:10 2016
@@ -26,10 +26,6 @@
  */
 
 /**
- * Thread-safety annotations based on JCIP-ANNOTATIONS
- * <p>
- * Copyright (c) 2005 Brian Goetz and Tim Peierls.
- * See http://www.jcip.net
- * </p>
+ * Provides annotations for public interface definitions
  */
 package org.apache.http.annotation;

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/config/ConnectionConfig.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/config/ConnectionConfig.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/config/ConnectionConfig.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/config/ConnectionConfig.java Tue Jun  7 18:24:10 2016
@@ -31,7 +31,8 @@ import java.nio.charset.Charset;
 import java.nio.charset.CodingErrorAction;
 
 import org.apache.http.Consts;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.ThreadingBehavior;
+import org.apache.http.annotation.Contract;
 import org.apache.http.util.Args;
 
 /**
@@ -39,7 +40,7 @@ import org.apache.http.util.Args;
  *
  * @since 4.3
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class ConnectionConfig implements Cloneable {
 
     public static final ConnectionConfig DEFAULT = new Builder().build();

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/config/Registry.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/config/Registry.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/config/Registry.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/config/Registry.java Tue Jun  7 18:24:10 2016
@@ -27,18 +27,19 @@
 
 package org.apache.http.config;
 
+import org.apache.http.annotation.ThreadingBehavior;
+import org.apache.http.annotation.Contract;
+
 import java.util.Locale;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
-import org.apache.http.annotation.ThreadSafe;
-
 /**
  * Generic registry of items keyed by low-case string ID.
  *
  * @since 4.3
  */
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE)
 public final class Registry<I> implements Lookup<I> {
 
     private final Map<String, I> map;

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/config/RegistryBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/config/RegistryBuilder.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/config/RegistryBuilder.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/config/RegistryBuilder.java Tue Jun  7 18:24:10 2016
@@ -31,7 +31,6 @@ import java.util.HashMap;
 import java.util.Locale;
 import java.util.Map;
 
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.util.Args;
 
 /**
@@ -39,7 +38,6 @@ import org.apache.http.util.Args;
  *
  * @since 4.3
  */
-@NotThreadSafe
 public final class RegistryBuilder<I> {
 
     private final Map<String, I> items;

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/config/SocketConfig.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/config/SocketConfig.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/config/SocketConfig.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/config/SocketConfig.java Tue Jun  7 18:24:10 2016
@@ -27,7 +27,8 @@
 
 package org.apache.http.config;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.ThreadingBehavior;
+import org.apache.http.annotation.Contract;
 import org.apache.http.util.Args;
 
 /**
@@ -35,7 +36,7 @@ import org.apache.http.util.Args;
  *
  * @since 4.3
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class SocketConfig implements Cloneable {
 
     public static final SocketConfig DEFAULT = new Builder().build();

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/AbstractHttpEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/AbstractHttpEntity.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/AbstractHttpEntity.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/AbstractHttpEntity.java Tue Jun  7 18:24:10 2016
@@ -31,7 +31,6 @@ import java.io.IOException;
 
 import org.apache.http.Header;
 import org.apache.http.HttpEntity;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.message.BasicHeader;
 import org.apache.http.protocol.HTTP;
 
@@ -42,7 +41,6 @@ import org.apache.http.protocol.HTTP;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public abstract class AbstractHttpEntity implements HttpEntity {
 
     /**

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/BasicHttpEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/BasicHttpEntity.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/BasicHttpEntity.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/BasicHttpEntity.java Tue Jun  7 18:24:10 2016
@@ -31,7 +31,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.impl.io.EmptyInputStream;
 import org.apache.http.util.Args;
 import org.apache.http.util.Asserts;
@@ -42,7 +41,6 @@ import org.apache.http.util.Asserts;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class BasicHttpEntity extends AbstractHttpEntity {
 
     private InputStream content;

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/BufferedHttpEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/BufferedHttpEntity.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/BufferedHttpEntity.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/BufferedHttpEntity.java Tue Jun  7 18:24:10 2016
@@ -34,7 +34,6 @@ import java.io.InputStream;
 import java.io.OutputStream;
 
 import org.apache.http.HttpEntity;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.util.Args;
 
 /**
@@ -46,7 +45,6 @@ import org.apache.http.util.Args;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class BufferedHttpEntity extends HttpEntityWrapper {
 
     private final byte[] buffer;

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/ByteArrayEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/ByteArrayEntity.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/ByteArrayEntity.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/ByteArrayEntity.java Tue Jun  7 18:24:10 2016
@@ -32,7 +32,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.util.Args;
 
 /**
@@ -40,7 +39,6 @@ import org.apache.http.util.Args;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class ByteArrayEntity extends AbstractHttpEntity implements Cloneable {
 
     /**

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/ContentType.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/ContentType.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/ContentType.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/ContentType.java Tue Jun  7 18:24:10 2016
@@ -42,7 +42,8 @@ import org.apache.http.HeaderElement;
 import org.apache.http.HttpEntity;
 import org.apache.http.NameValuePair;
 import org.apache.http.ParseException;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.ThreadingBehavior;
+import org.apache.http.annotation.Contract;
 import org.apache.http.message.BasicHeaderValueFormatter;
 import org.apache.http.message.BasicHeaderValueParser;
 import org.apache.http.message.BasicNameValuePair;
@@ -60,7 +61,7 @@ import org.apache.http.util.TextUtils;
  *
  * @since 4.2
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public final class ContentType implements Serializable {
 
     private static final long serialVersionUID = -7768694718232371896L;

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/FileEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/FileEntity.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/FileEntity.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/FileEntity.java Tue Jun  7 18:24:10 2016
@@ -33,7 +33,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.util.Args;
 
 /**
@@ -41,7 +40,6 @@ import org.apache.http.util.Args;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class FileEntity extends AbstractHttpEntity implements Cloneable {
 
     protected final File file;

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/HttpEntityWrapper.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/HttpEntityWrapper.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/HttpEntityWrapper.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/HttpEntityWrapper.java Tue Jun  7 18:24:10 2016
@@ -33,7 +33,6 @@ import java.io.OutputStream;
 
 import org.apache.http.Header;
 import org.apache.http.HttpEntity;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.util.Args;
 
 /**
@@ -45,7 +44,6 @@ import org.apache.http.util.Args;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class HttpEntityWrapper implements HttpEntity {
 
     /** The wrapped entity. */

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/InputStreamEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/InputStreamEntity.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/InputStreamEntity.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/InputStreamEntity.java Tue Jun  7 18:24:10 2016
@@ -31,7 +31,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.util.Args;
 
 /**
@@ -40,7 +39,6 @@ import org.apache.http.util.Args;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class InputStreamEntity extends AbstractHttpEntity {
 
     private final InputStream content;

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/SerializableEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/SerializableEntity.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/SerializableEntity.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/SerializableEntity.java Tue Jun  7 18:24:10 2016
@@ -35,7 +35,6 @@ import java.io.ObjectOutputStream;
 import java.io.OutputStream;
 import java.io.Serializable;
 
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.util.Args;
 
 /**
@@ -46,7 +45,6 @@ import org.apache.http.util.Args;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class SerializableEntity extends AbstractHttpEntity {
 
     private byte[] objSer;

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/StringEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/StringEntity.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/StringEntity.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/StringEntity.java Tue Jun  7 18:24:10 2016
@@ -35,7 +35,6 @@ import java.io.UnsupportedEncodingExcept
 import java.nio.charset.Charset;
 import java.nio.charset.UnsupportedCharsetException;
 
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.protocol.HTTP;
 import org.apache.http.util.Args;
 
@@ -45,7 +44,6 @@ import org.apache.http.util.Args;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class StringEntity extends AbstractHttpEntity implements Cloneable {
 
     protected final byte[] content;

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/BHttpConnectionBase.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/BHttpConnectionBase.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/BHttpConnectionBase.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/BHttpConnectionBase.java Tue Jun  7 18:24:10 2016
@@ -47,7 +47,6 @@ import org.apache.http.HttpEntity;
 import org.apache.http.HttpException;
 import org.apache.http.HttpInetConnection;
 import org.apache.http.HttpMessage;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.config.MessageConstraints;
 import org.apache.http.entity.BasicHttpEntity;
 import org.apache.http.entity.ContentLengthStrategy;
@@ -75,7 +74,6 @@ import org.apache.http.util.NetUtils;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class BHttpConnectionBase implements HttpConnection, HttpInetConnection {
 
     private final SessionInputBufferImpl inbuffer;

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/DefaultBHttpClientConnection.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/DefaultBHttpClientConnection.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/DefaultBHttpClientConnection.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/DefaultBHttpClientConnection.java Tue Jun  7 18:24:10 2016
@@ -41,7 +41,6 @@ import org.apache.http.HttpException;
 import org.apache.http.HttpRequest;
 import org.apache.http.HttpResponse;
 import org.apache.http.HttpStatus;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.config.MessageConstraints;
 import org.apache.http.entity.ContentLengthStrategy;
 import org.apache.http.impl.io.DefaultHttpRequestWriterFactory;
@@ -57,7 +56,6 @@ import org.apache.http.util.Args;
  *
  * @since 4.3
  */
-@NotThreadSafe
 public class DefaultBHttpClientConnection extends BHttpConnectionBase
                                                    implements HttpClientConnection {
 

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/DefaultBHttpClientConnectionFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/DefaultBHttpClientConnectionFactory.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/DefaultBHttpClientConnectionFactory.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/DefaultBHttpClientConnectionFactory.java Tue Jun  7 18:24:10 2016
@@ -30,7 +30,8 @@ package org.apache.http.impl;
 import org.apache.http.HttpConnectionFactory;
 import org.apache.http.HttpRequest;
 import org.apache.http.HttpResponse;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.ThreadingBehavior;
+import org.apache.http.annotation.Contract;
 import org.apache.http.config.ConnectionConfig;
 import org.apache.http.entity.ContentLengthStrategy;
 import org.apache.http.io.HttpMessageParserFactory;
@@ -44,9 +45,8 @@ import java.net.Socket;
  *
  * @since 4.3
  */
-@Immutable
-public class DefaultBHttpClientConnectionFactory
-        implements HttpConnectionFactory<DefaultBHttpClientConnection> {
+@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL)
+public class DefaultBHttpClientConnectionFactory implements HttpConnectionFactory<DefaultBHttpClientConnection> {
 
     public static final DefaultBHttpClientConnectionFactory INSTANCE = new DefaultBHttpClientConnectionFactory();
 

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/DefaultBHttpServerConnection.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/DefaultBHttpServerConnection.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/DefaultBHttpServerConnection.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/DefaultBHttpServerConnection.java Tue Jun  7 18:24:10 2016
@@ -39,7 +39,6 @@ import org.apache.http.HttpException;
 import org.apache.http.HttpRequest;
 import org.apache.http.HttpResponse;
 import org.apache.http.HttpServerConnection;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.config.MessageConstraints;
 import org.apache.http.entity.ContentLengthStrategy;
 import org.apache.http.impl.entity.DisallowIdentityContentLengthStrategy;
@@ -56,9 +55,7 @@ import org.apache.http.util.Args;
  *
  * @since 4.3
  */
-@NotThreadSafe
-public class DefaultBHttpServerConnection extends BHttpConnectionBase
-                                                   implements HttpServerConnection {
+public class DefaultBHttpServerConnection extends BHttpConnectionBase implements HttpServerConnection {
 
     private final HttpMessageParser<HttpRequest> requestParser;
     private final HttpMessageWriter<HttpResponse> responseWriter;

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/DefaultBHttpServerConnectionFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/DefaultBHttpServerConnectionFactory.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/DefaultBHttpServerConnectionFactory.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/DefaultBHttpServerConnectionFactory.java Tue Jun  7 18:24:10 2016
@@ -30,7 +30,8 @@ package org.apache.http.impl;
 import org.apache.http.HttpConnectionFactory;
 import org.apache.http.HttpRequest;
 import org.apache.http.HttpResponse;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.ThreadingBehavior;
+import org.apache.http.annotation.Contract;
 import org.apache.http.config.ConnectionConfig;
 import org.apache.http.entity.ContentLengthStrategy;
 import org.apache.http.io.HttpMessageParserFactory;
@@ -44,7 +45,7 @@ import java.net.Socket;
  *
  * @since 4.3
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL)
 public class DefaultBHttpServerConnectionFactory
         implements HttpConnectionFactory<DefaultBHttpServerConnection> {
 

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/DefaultConnectionReuseStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/DefaultConnectionReuseStrategy.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/DefaultConnectionReuseStrategy.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/DefaultConnectionReuseStrategy.java Tue Jun  7 18:24:10 2016
@@ -36,7 +36,8 @@ import org.apache.http.HttpVersion;
 import org.apache.http.ParseException;
 import org.apache.http.ProtocolVersion;
 import org.apache.http.TokenIterator;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.ThreadingBehavior;
+import org.apache.http.annotation.Contract;
 import org.apache.http.message.BasicHeaderIterator;
 import org.apache.http.message.BasicTokenIterator;
 import org.apache.http.protocol.HTTP;
@@ -61,7 +62,7 @@ import org.apache.http.util.Args;
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class DefaultConnectionReuseStrategy implements ConnectionReuseStrategy {
 
     public static final DefaultConnectionReuseStrategy INSTANCE = new DefaultConnectionReuseStrategy();

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/DefaultHttpRequestFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/DefaultHttpRequestFactory.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/DefaultHttpRequestFactory.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/DefaultHttpRequestFactory.java Tue Jun  7 18:24:10 2016
@@ -31,7 +31,8 @@ import org.apache.http.HttpRequest;
 import org.apache.http.HttpRequestFactory;
 import org.apache.http.MethodNotSupportedException;
 import org.apache.http.RequestLine;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.ThreadingBehavior;
+import org.apache.http.annotation.Contract;
 import org.apache.http.message.BasicHttpEntityEnclosingRequest;
 import org.apache.http.message.BasicHttpRequest;
 import org.apache.http.util.Args;
@@ -41,7 +42,7 @@ import org.apache.http.util.Args;
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class DefaultHttpRequestFactory implements HttpRequestFactory {
 
     public static final DefaultHttpRequestFactory INSTANCE = new DefaultHttpRequestFactory();

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/DefaultHttpResponseFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/DefaultHttpResponseFactory.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/DefaultHttpResponseFactory.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/DefaultHttpResponseFactory.java Tue Jun  7 18:24:10 2016
@@ -34,7 +34,8 @@ import org.apache.http.HttpResponseFacto
 import org.apache.http.ProtocolVersion;
 import org.apache.http.ReasonPhraseCatalog;
 import org.apache.http.StatusLine;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.ThreadingBehavior;
+import org.apache.http.annotation.Contract;
 import org.apache.http.message.BasicHttpResponse;
 import org.apache.http.message.BasicStatusLine;
 import org.apache.http.protocol.HttpContext;
@@ -45,7 +46,7 @@ import org.apache.http.util.Args;
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL)
 public class DefaultHttpResponseFactory implements HttpResponseFactory {
 
     public static final DefaultHttpResponseFactory INSTANCE = new DefaultHttpResponseFactory();

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/EnglishReasonPhraseCatalog.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/EnglishReasonPhraseCatalog.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/EnglishReasonPhraseCatalog.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/EnglishReasonPhraseCatalog.java Tue Jun  7 18:24:10 2016
@@ -31,7 +31,8 @@ import java.util.Locale;
 
 import org.apache.http.HttpStatus;
 import org.apache.http.ReasonPhraseCatalog;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.ThreadingBehavior;
+import org.apache.http.annotation.Contract;
 import org.apache.http.util.Args;
 
 /**
@@ -41,7 +42,7 @@ import org.apache.http.util.Args;
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class EnglishReasonPhraseCatalog implements ReasonPhraseCatalog {
 
     // static array with english reason phrases defined below
@@ -51,8 +52,7 @@ public class EnglishReasonPhraseCatalog
      * This catalog is thread safe, so there typically
      * is no need to create other instances.
      */
-    public final static EnglishReasonPhraseCatalog INSTANCE =
-        new EnglishReasonPhraseCatalog();
+    public final static EnglishReasonPhraseCatalog INSTANCE = new EnglishReasonPhraseCatalog();
 
 
     /**

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/HttpConnectionMetricsImpl.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/HttpConnectionMetricsImpl.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/HttpConnectionMetricsImpl.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/HttpConnectionMetricsImpl.java Tue Jun  7 18:24:10 2016
@@ -31,7 +31,6 @@ import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.http.HttpConnectionMetrics;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.io.HttpTransportMetrics;
 
 /**
@@ -39,7 +38,6 @@ import org.apache.http.io.HttpTransportM
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class HttpConnectionMetricsImpl implements HttpConnectionMetrics {
 
     public static final String REQUEST_COUNT = "http.request-count";

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/NoConnectionReuseStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/NoConnectionReuseStrategy.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/NoConnectionReuseStrategy.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/NoConnectionReuseStrategy.java Tue Jun  7 18:24:10 2016
@@ -29,7 +29,8 @@ package org.apache.http.impl;
 
 import org.apache.http.ConnectionReuseStrategy;
 import org.apache.http.HttpResponse;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.ThreadingBehavior;
+import org.apache.http.annotation.Contract;
 import org.apache.http.protocol.HttpContext;
 
 /**
@@ -37,7 +38,7 @@ import org.apache.http.protocol.HttpCont
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class NoConnectionReuseStrategy implements ConnectionReuseStrategy {
 
     public static final NoConnectionReuseStrategy INSTANCE = new NoConnectionReuseStrategy();

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/entity/DisallowIdentityContentLengthStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/entity/DisallowIdentityContentLengthStrategy.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/entity/DisallowIdentityContentLengthStrategy.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/entity/DisallowIdentityContentLengthStrategy.java Tue Jun  7 18:24:10 2016
@@ -30,7 +30,8 @@ package org.apache.http.impl.entity;
 import org.apache.http.HttpException;
 import org.apache.http.HttpMessage;
 import org.apache.http.ProtocolException;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.ThreadingBehavior;
+import org.apache.http.annotation.Contract;
 import org.apache.http.entity.ContentLengthStrategy;
 
 /**
@@ -39,7 +40,7 @@ import org.apache.http.entity.ContentLen
  *
  * @since 4.2
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL)
 public class DisallowIdentityContentLengthStrategy implements ContentLengthStrategy {
 
     public static final DisallowIdentityContentLengthStrategy INSTANCE =

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/entity/LaxContentLengthStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/entity/LaxContentLengthStrategy.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/entity/LaxContentLengthStrategy.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/entity/LaxContentLengthStrategy.java Tue Jun  7 18:24:10 2016
@@ -33,7 +33,8 @@ import org.apache.http.HttpException;
 import org.apache.http.HttpMessage;
 import org.apache.http.ParseException;
 import org.apache.http.ProtocolException;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.ThreadingBehavior;
+import org.apache.http.annotation.Contract;
 import org.apache.http.entity.ContentLengthStrategy;
 import org.apache.http.protocol.HTTP;
 import org.apache.http.util.Args;
@@ -47,7 +48,7 @@ import org.apache.http.util.Args;
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class LaxContentLengthStrategy implements ContentLengthStrategy {
 
     public static final LaxContentLengthStrategy INSTANCE = new LaxContentLengthStrategy();

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/entity/StrictContentLengthStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/entity/StrictContentLengthStrategy.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/entity/StrictContentLengthStrategy.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/entity/StrictContentLengthStrategy.java Tue Jun  7 18:24:10 2016
@@ -32,7 +32,8 @@ import org.apache.http.HttpException;
 import org.apache.http.HttpMessage;
 import org.apache.http.HttpVersion;
 import org.apache.http.ProtocolException;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.ThreadingBehavior;
+import org.apache.http.annotation.Contract;
 import org.apache.http.entity.ContentLengthStrategy;
 import org.apache.http.protocol.HTTP;
 import org.apache.http.util.Args;
@@ -47,7 +48,7 @@ import org.apache.http.util.Args;
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class StrictContentLengthStrategy implements ContentLengthStrategy {
 
     public static final StrictContentLengthStrategy INSTANCE = new StrictContentLengthStrategy();

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageParser.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageParser.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageParser.java Tue Jun  7 18:24:10 2016
@@ -37,7 +37,6 @@ import org.apache.http.HttpMessage;
 import org.apache.http.MessageConstraintException;
 import org.apache.http.ParseException;
 import org.apache.http.ProtocolException;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.config.MessageConstraints;
 import org.apache.http.io.HttpMessageParser;
 import org.apache.http.io.SessionInputBuffer;
@@ -55,7 +54,6 @@ import org.apache.http.util.CharArrayBuf
  * @since 4.0
  */
 @SuppressWarnings("deprecation")
-@NotThreadSafe
 public abstract class AbstractMessageParser<T extends HttpMessage> implements HttpMessageParser<T> {
 
     private static final int HEAD_LINE    = 0;

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageWriter.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageWriter.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageWriter.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageWriter.java Tue Jun  7 18:24:10 2016
@@ -33,7 +33,6 @@ import org.apache.http.Header;
 import org.apache.http.HeaderIterator;
 import org.apache.http.HttpException;
 import org.apache.http.HttpMessage;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.io.HttpMessageWriter;
 import org.apache.http.io.SessionOutputBuffer;
 import org.apache.http.message.BasicLineFormatter;
@@ -49,7 +48,6 @@ import org.apache.http.util.CharArrayBuf
  * @since 4.0
  */
 @SuppressWarnings("deprecation")
-@NotThreadSafe
 public abstract class AbstractMessageWriter<T extends HttpMessage> implements HttpMessageWriter<T> {
 
     protected final SessionOutputBuffer sessionBuffer;

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/ChunkedInputStream.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/ChunkedInputStream.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/ChunkedInputStream.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/ChunkedInputStream.java Tue Jun  7 18:24:10 2016
@@ -35,7 +35,6 @@ import org.apache.http.Header;
 import org.apache.http.HttpException;
 import org.apache.http.MalformedChunkCodingException;
 import org.apache.http.TruncatedChunkException;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.config.MessageConstraints;
 import org.apache.http.io.BufferInfo;
 import org.apache.http.io.SessionInputBuffer;
@@ -58,7 +57,6 @@ import org.apache.http.util.CharArrayBuf
  * @since 4.0
  *
  */
-@NotThreadSafe
 public class ChunkedInputStream extends InputStream {
 
     private static final int CHUNK_LEN               = 1;

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/ChunkedOutputStream.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/ChunkedOutputStream.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/ChunkedOutputStream.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/ChunkedOutputStream.java Tue Jun  7 18:24:10 2016
@@ -30,7 +30,6 @@ package org.apache.http.impl.io;
 import java.io.IOException;
 import java.io.OutputStream;
 
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.io.SessionOutputBuffer;
 
 /**
@@ -45,7 +44,6 @@ import org.apache.http.io.SessionOutputB
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class ChunkedOutputStream extends OutputStream {
 
     // ----------------------------------------------------- Instance Variables

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/ContentLengthInputStream.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/ContentLengthInputStream.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/ContentLengthInputStream.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/ContentLengthInputStream.java Tue Jun  7 18:24:10 2016
@@ -31,7 +31,6 @@ import java.io.IOException;
 import java.io.InputStream;
 
 import org.apache.http.ConnectionClosedException;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.io.BufferInfo;
 import org.apache.http.io.SessionInputBuffer;
 import org.apache.http.util.Args;
@@ -52,7 +51,6 @@ import org.apache.http.util.Args;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class ContentLengthInputStream extends InputStream {
 
     private static final int BUFFER_SIZE = 2048;

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/ContentLengthOutputStream.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/ContentLengthOutputStream.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/ContentLengthOutputStream.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/ContentLengthOutputStream.java Tue Jun  7 18:24:10 2016
@@ -30,7 +30,6 @@ package org.apache.http.impl.io;
 import java.io.IOException;
 import java.io.OutputStream;
 
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.io.SessionOutputBuffer;
 import org.apache.http.util.Args;
 
@@ -47,7 +46,6 @@ import org.apache.http.util.Args;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class ContentLengthOutputStream extends OutputStream {
 
     /**

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpRequestParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpRequestParser.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpRequestParser.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpRequestParser.java Tue Jun  7 18:24:10 2016
@@ -35,7 +35,6 @@ import org.apache.http.HttpRequest;
 import org.apache.http.HttpRequestFactory;
 import org.apache.http.ParseException;
 import org.apache.http.RequestLine;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.config.MessageConstraints;
 import org.apache.http.impl.DefaultHttpRequestFactory;
 import org.apache.http.io.SessionInputBuffer;
@@ -52,7 +51,6 @@ import org.apache.http.util.CharArrayBuf
  * @since 4.2
  */
 @SuppressWarnings("deprecation")
-@NotThreadSafe
 public class DefaultHttpRequestParser extends AbstractMessageParser<HttpRequest> {
 
     private final HttpRequestFactory requestFactory;

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpRequestParserFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpRequestParserFactory.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpRequestParserFactory.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpRequestParserFactory.java Tue Jun  7 18:24:10 2016
@@ -29,7 +29,8 @@ package org.apache.http.impl.io;
 
 import org.apache.http.HttpRequest;
 import org.apache.http.HttpRequestFactory;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.ThreadingBehavior;
+import org.apache.http.annotation.Contract;
 import org.apache.http.config.MessageConstraints;
 import org.apache.http.impl.DefaultHttpRequestFactory;
 import org.apache.http.io.HttpMessageParser;
@@ -43,7 +44,7 @@ import org.apache.http.message.LineParse
  *
  * @since 4.3
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL)
 public class DefaultHttpRequestParserFactory implements HttpMessageParserFactory<HttpRequest> {
 
     public static final DefaultHttpRequestParserFactory INSTANCE = new DefaultHttpRequestParserFactory();

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpRequestWriter.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpRequestWriter.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpRequestWriter.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpRequestWriter.java Tue Jun  7 18:24:10 2016
@@ -30,7 +30,6 @@ package org.apache.http.impl.io;
 import java.io.IOException;
 
 import org.apache.http.HttpRequest;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.io.SessionOutputBuffer;
 import org.apache.http.message.LineFormatter;
 
@@ -39,7 +38,6 @@ import org.apache.http.message.LineForma
  *
  * @since 4.3
  */
-@NotThreadSafe
 public class DefaultHttpRequestWriter extends AbstractMessageWriter<HttpRequest> {
 
     /**

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpRequestWriterFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpRequestWriterFactory.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpRequestWriterFactory.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpRequestWriterFactory.java Tue Jun  7 18:24:10 2016
@@ -28,7 +28,8 @@
 package org.apache.http.impl.io;
 
 import org.apache.http.HttpRequest;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.ThreadingBehavior;
+import org.apache.http.annotation.Contract;
 import org.apache.http.io.HttpMessageWriter;
 import org.apache.http.io.HttpMessageWriterFactory;
 import org.apache.http.io.SessionOutputBuffer;
@@ -40,7 +41,7 @@ import org.apache.http.message.LineForma
  *
  * @since 4.3
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL)
 public class DefaultHttpRequestWriterFactory implements HttpMessageWriterFactory<HttpRequest> {
 
     public static final DefaultHttpRequestWriterFactory INSTANCE = new DefaultHttpRequestWriterFactory();

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpResponseParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpResponseParser.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpResponseParser.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpResponseParser.java Tue Jun  7 18:24:10 2016
@@ -35,7 +35,6 @@ import org.apache.http.HttpResponseFacto
 import org.apache.http.NoHttpResponseException;
 import org.apache.http.ParseException;
 import org.apache.http.StatusLine;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.config.MessageConstraints;
 import org.apache.http.impl.DefaultHttpResponseFactory;
 import org.apache.http.io.SessionInputBuffer;
@@ -52,7 +51,6 @@ import org.apache.http.util.CharArrayBuf
  * @since 4.2
  */
 @SuppressWarnings("deprecation")
-@NotThreadSafe
 public class DefaultHttpResponseParser extends AbstractMessageParser<HttpResponse> {
 
     private final HttpResponseFactory responseFactory;

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpResponseParserFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpResponseParserFactory.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpResponseParserFactory.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpResponseParserFactory.java Tue Jun  7 18:24:10 2016
@@ -29,7 +29,8 @@ package org.apache.http.impl.io;
 
 import org.apache.http.HttpResponse;
 import org.apache.http.HttpResponseFactory;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.ThreadingBehavior;
+import org.apache.http.annotation.Contract;
 import org.apache.http.config.MessageConstraints;
 import org.apache.http.impl.DefaultHttpResponseFactory;
 import org.apache.http.io.HttpMessageParser;
@@ -43,7 +44,7 @@ import org.apache.http.message.LineParse
  *
  * @since 4.3
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL)
 public class DefaultHttpResponseParserFactory implements HttpMessageParserFactory<HttpResponse> {
 
     public static final DefaultHttpResponseParserFactory INSTANCE = new DefaultHttpResponseParserFactory();

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpResponseWriter.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpResponseWriter.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpResponseWriter.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpResponseWriter.java Tue Jun  7 18:24:10 2016
@@ -30,7 +30,6 @@ package org.apache.http.impl.io;
 import java.io.IOException;
 
 import org.apache.http.HttpResponse;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.io.SessionOutputBuffer;
 import org.apache.http.message.LineFormatter;
 
@@ -39,7 +38,6 @@ import org.apache.http.message.LineForma
  *
  * @since 4.3
  */
-@NotThreadSafe
 public class DefaultHttpResponseWriter extends AbstractMessageWriter<HttpResponse> {
 
     /**

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpResponseWriterFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpResponseWriterFactory.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpResponseWriterFactory.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpResponseWriterFactory.java Tue Jun  7 18:24:10 2016
@@ -28,7 +28,8 @@
 package org.apache.http.impl.io;
 
 import org.apache.http.HttpResponse;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.ThreadingBehavior;
+import org.apache.http.annotation.Contract;
 import org.apache.http.io.HttpMessageWriter;
 import org.apache.http.io.HttpMessageWriterFactory;
 import org.apache.http.io.SessionOutputBuffer;
@@ -40,7 +41,7 @@ import org.apache.http.message.LineForma
  *
  * @since 4.3
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL)
 public class DefaultHttpResponseWriterFactory implements HttpMessageWriterFactory<HttpResponse> {
 
     public static final DefaultHttpResponseWriterFactory INSTANCE = new DefaultHttpResponseWriterFactory();

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/HttpTransportMetricsImpl.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/HttpTransportMetricsImpl.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/HttpTransportMetricsImpl.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/HttpTransportMetricsImpl.java Tue Jun  7 18:24:10 2016
@@ -27,7 +27,6 @@
 
 package org.apache.http.impl.io;
 
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.io.HttpTransportMetrics;
 
 /**
@@ -35,7 +34,6 @@ import org.apache.http.io.HttpTransportM
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class HttpTransportMetricsImpl implements HttpTransportMetrics {
 
     private long bytesTransferred = 0;

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/IdentityInputStream.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/IdentityInputStream.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/IdentityInputStream.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/IdentityInputStream.java Tue Jun  7 18:24:10 2016
@@ -30,7 +30,6 @@ package org.apache.http.impl.io;
 import java.io.IOException;
 import java.io.InputStream;
 
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.io.BufferInfo;
 import org.apache.http.io.SessionInputBuffer;
 import org.apache.http.util.Args;
@@ -47,7 +46,6 @@ import org.apache.http.util.Args;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class IdentityInputStream extends InputStream {
 
     private final SessionInputBuffer in;

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/IdentityOutputStream.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/IdentityOutputStream.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/IdentityOutputStream.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/IdentityOutputStream.java Tue Jun  7 18:24:10 2016
@@ -30,7 +30,6 @@ package org.apache.http.impl.io;
 import java.io.IOException;
 import java.io.OutputStream;
 
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.io.SessionOutputBuffer;
 import org.apache.http.util.Args;
 
@@ -46,7 +45,6 @@ import org.apache.http.util.Args;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class IdentityOutputStream extends OutputStream {
 
     /**

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/SessionInputBufferImpl.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/SessionInputBufferImpl.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/SessionInputBufferImpl.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/SessionInputBufferImpl.java Tue Jun  7 18:24:10 2016
@@ -35,7 +35,6 @@ import java.nio.charset.CharsetDecoder;
 import java.nio.charset.CoderResult;
 
 import org.apache.http.MessageConstraintException;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.config.MessageConstraints;
 import org.apache.http.io.BufferInfo;
 import org.apache.http.io.HttpTransportMetrics;
@@ -57,7 +56,6 @@ import org.apache.http.util.CharArrayBuf
  *
  * @since 4.3
  */
-@NotThreadSafe
 public class SessionInputBufferImpl implements SessionInputBuffer, BufferInfo {
 
     private final HttpTransportMetricsImpl metrics;

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/SessionOutputBufferImpl.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/SessionOutputBufferImpl.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/SessionOutputBufferImpl.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/io/SessionOutputBufferImpl.java Tue Jun  7 18:24:10 2016
@@ -34,7 +34,6 @@ import java.nio.CharBuffer;
 import java.nio.charset.CharsetEncoder;
 import java.nio.charset.CoderResult;
 
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.io.BufferInfo;
 import org.apache.http.io.HttpTransportMetrics;
 import org.apache.http.io.SessionOutputBuffer;
@@ -54,7 +53,6 @@ import org.apache.http.util.CharArrayBuf
  *
  * @since 4.3
  */
-@NotThreadSafe
 public class SessionOutputBufferImpl implements SessionOutputBuffer, BufferInfo {
 
     private static final byte[] CRLF = new byte[] {HTTP.CR, HTTP.LF};

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/pool/BasicConnFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/pool/BasicConnFactory.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/pool/BasicConnFactory.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/pool/BasicConnFactory.java Tue Jun  7 18:24:10 2016
@@ -36,7 +36,8 @@ import javax.net.ssl.SSLSocketFactory;
 import org.apache.http.HttpClientConnection;
 import org.apache.http.HttpConnectionFactory;
 import org.apache.http.HttpHost;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.ThreadingBehavior;
+import org.apache.http.annotation.Contract;
 import org.apache.http.config.ConnectionConfig;
 import org.apache.http.config.SocketConfig;
 import org.apache.http.impl.DefaultBHttpClientConnection;
@@ -55,7 +56,7 @@ import org.apache.http.util.Args;
  * @since 4.2
  */
 @SuppressWarnings("deprecation")
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL)
 public class BasicConnFactory implements ConnFactory<HttpHost, HttpClientConnection> {
 
     private final SocketFactory plainfactory;

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/pool/BasicConnPool.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/pool/BasicConnPool.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/pool/BasicConnPool.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/pool/BasicConnPool.java Tue Jun  7 18:24:10 2016
@@ -30,7 +30,8 @@ import java.util.concurrent.atomic.Atomi
 
 import org.apache.http.HttpClientConnection;
 import org.apache.http.HttpHost;
-import org.apache.http.annotation.ThreadSafe;
+import org.apache.http.annotation.ThreadingBehavior;
+import org.apache.http.annotation.Contract;
 import org.apache.http.config.ConnectionConfig;
 import org.apache.http.config.SocketConfig;
 import org.apache.http.params.HttpParams;
@@ -48,7 +49,7 @@ import org.apache.http.pool.ConnFactory;
  * @since 4.2
  */
 @SuppressWarnings("deprecation")
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
 public class BasicConnPool extends AbstractConnPool<HttpHost, HttpClientConnection, BasicPoolEntry> {
 
     private static final AtomicLong COUNTER = new AtomicLong();

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/pool/BasicPoolEntry.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/pool/BasicPoolEntry.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/pool/BasicPoolEntry.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/impl/pool/BasicPoolEntry.java Tue Jun  7 18:24:10 2016
@@ -30,7 +30,8 @@ import java.io.IOException;
 
 import org.apache.http.HttpClientConnection;
 import org.apache.http.HttpHost;
-import org.apache.http.annotation.ThreadSafe;
+import org.apache.http.annotation.ThreadingBehavior;
+import org.apache.http.annotation.Contract;
 import org.apache.http.pool.PoolEntry;
 
 /**
@@ -41,7 +42,7 @@ import org.apache.http.pool.PoolEntry;
  * @see HttpHost
  * @since 4.2
  */
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
 public class BasicPoolEntry extends PoolEntry<HttpHost, HttpClientConnection> {
 
     public BasicPoolEntry(final String id, final HttpHost route, final HttpClientConnection conn) {

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/AbstractHttpMessage.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/AbstractHttpMessage.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/AbstractHttpMessage.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/AbstractHttpMessage.java Tue Jun  7 18:24:10 2016
@@ -30,7 +30,6 @@ package org.apache.http.message;
 import org.apache.http.Header;
 import org.apache.http.HeaderIterator;
 import org.apache.http.HttpMessage;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.params.BasicHttpParams;
 import org.apache.http.params.HttpParams;
 import org.apache.http.util.Args;
@@ -41,7 +40,6 @@ import org.apache.http.util.Args;
  * @since 4.0
  */
 @SuppressWarnings("deprecation")
-@NotThreadSafe
 public abstract class AbstractHttpMessage implements HttpMessage {
 
     protected HeaderGroup headergroup;

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHeader.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHeader.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHeader.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHeader.java Tue Jun  7 18:24:10 2016
@@ -32,7 +32,8 @@ import java.io.Serializable;
 import org.apache.http.Header;
 import org.apache.http.HeaderElement;
 import org.apache.http.ParseException;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.ThreadingBehavior;
+import org.apache.http.annotation.Contract;
 import org.apache.http.util.Args;
 
 /**
@@ -40,7 +41,7 @@ import org.apache.http.util.Args;
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class BasicHeader implements Header, Cloneable, Serializable {
 
     private static final long serialVersionUID = -5427236326487562174L;

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHeaderElement.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHeaderElement.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHeaderElement.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHeaderElement.java Tue Jun  7 18:24:10 2016
@@ -29,7 +29,6 @@ package org.apache.http.message;
 
 import org.apache.http.HeaderElement;
 import org.apache.http.NameValuePair;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.util.Args;
 import org.apache.http.util.LangUtils;
 
@@ -38,7 +37,6 @@ import org.apache.http.util.LangUtils;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class BasicHeaderElement implements HeaderElement, Cloneable {
 
     private final String name;

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHeaderElementIterator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHeaderElementIterator.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHeaderElementIterator.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHeaderElementIterator.java Tue Jun  7 18:24:10 2016
@@ -34,7 +34,6 @@ import org.apache.http.Header;
 import org.apache.http.HeaderElement;
 import org.apache.http.HeaderElementIterator;
 import org.apache.http.HeaderIterator;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.util.Args;
 import org.apache.http.util.CharArrayBuffer;
 
@@ -43,7 +42,6 @@ import org.apache.http.util.CharArrayBuf
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class BasicHeaderElementIterator implements HeaderElementIterator {
 
     private final HeaderIterator headerIt;

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHeaderIterator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHeaderIterator.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHeaderIterator.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHeaderIterator.java Tue Jun  7 18:24:10 2016
@@ -31,7 +31,6 @@ import java.util.NoSuchElementException;
 
 import org.apache.http.Header;
 import org.apache.http.HeaderIterator;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.util.Args;
 
 /**
@@ -39,7 +38,6 @@ import org.apache.http.util.Args;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class BasicHeaderIterator implements HeaderIterator {
 
     /**

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHeaderValueFormatter.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHeaderValueFormatter.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHeaderValueFormatter.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHeaderValueFormatter.java Tue Jun  7 18:24:10 2016
@@ -29,7 +29,8 @@ package org.apache.http.message;
 
 import org.apache.http.HeaderElement;
 import org.apache.http.NameValuePair;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.ThreadingBehavior;
+import org.apache.http.annotation.Contract;
 import org.apache.http.util.Args;
 import org.apache.http.util.CharArrayBuffer;
 
@@ -40,7 +41,7 @@ import org.apache.http.util.CharArrayBuf
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class BasicHeaderValueFormatter implements HeaderValueFormatter {
 
     /**
@@ -52,8 +53,7 @@ public class BasicHeaderValueFormatter i
      * @deprecated (4.3) use {@link #INSTANCE}
      */
     @Deprecated
-    public final static
-        BasicHeaderValueFormatter DEFAULT = new BasicHeaderValueFormatter();
+    public final static BasicHeaderValueFormatter DEFAULT = new BasicHeaderValueFormatter();
 
     public final static BasicHeaderValueFormatter INSTANCE = new BasicHeaderValueFormatter();
 

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHeaderValueParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHeaderValueParser.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHeaderValueParser.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHeaderValueParser.java Tue Jun  7 18:24:10 2016
@@ -34,7 +34,8 @@ import java.util.List;
 import org.apache.http.HeaderElement;
 import org.apache.http.NameValuePair;
 import org.apache.http.ParseException;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.ThreadingBehavior;
+import org.apache.http.annotation.Contract;
 import org.apache.http.util.Args;
 import org.apache.http.util.CharArrayBuffer;
 
@@ -45,7 +46,7 @@ import org.apache.http.util.CharArrayBuf
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class BasicHeaderValueParser implements HeaderValueParser {
 
     /**
@@ -57,8 +58,7 @@ public class BasicHeaderValueParser impl
      * @deprecated (4.3) use {@link #INSTANCE}
      */
     @Deprecated
-    public final static
-        BasicHeaderValueParser DEFAULT = new BasicHeaderValueParser();
+    public final static BasicHeaderValueParser DEFAULT = new BasicHeaderValueParser();
 
     public final static BasicHeaderValueParser INSTANCE = new BasicHeaderValueParser();
 

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHttpEntityEnclosingRequest.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHttpEntityEnclosingRequest.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHttpEntityEnclosingRequest.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHttpEntityEnclosingRequest.java Tue Jun  7 18:24:10 2016
@@ -32,7 +32,6 @@ import org.apache.http.HttpEntity;
 import org.apache.http.HttpEntityEnclosingRequest;
 import org.apache.http.ProtocolVersion;
 import org.apache.http.RequestLine;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.protocol.HTTP;
 
 /**
@@ -40,7 +39,6 @@ import org.apache.http.protocol.HTTP;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class BasicHttpEntityEnclosingRequest
             extends BasicHttpRequest implements HttpEntityEnclosingRequest {
 

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHttpRequest.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHttpRequest.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHttpRequest.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHttpRequest.java Tue Jun  7 18:24:10 2016
@@ -31,7 +31,6 @@ import org.apache.http.HttpRequest;
 import org.apache.http.HttpVersion;
 import org.apache.http.ProtocolVersion;
 import org.apache.http.RequestLine;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.util.Args;
 
 /**
@@ -39,7 +38,6 @@ import org.apache.http.util.Args;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class BasicHttpRequest extends AbstractHttpMessage implements HttpRequest {
 
     private final String method;

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHttpResponse.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHttpResponse.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHttpResponse.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicHttpResponse.java Tue Jun  7 18:24:10 2016
@@ -35,7 +35,6 @@ import org.apache.http.HttpVersion;
 import org.apache.http.ProtocolVersion;
 import org.apache.http.ReasonPhraseCatalog;
 import org.apache.http.StatusLine;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.util.Args;
 
 /**
@@ -45,7 +44,6 @@ import org.apache.http.util.Args;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class BasicHttpResponse extends AbstractHttpMessage implements HttpResponse {
 
     private StatusLine          statusline;

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicLineFormatter.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicLineFormatter.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicLineFormatter.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicLineFormatter.java Tue Jun  7 18:24:10 2016
@@ -32,7 +32,8 @@ import org.apache.http.Header;
 import org.apache.http.ProtocolVersion;
 import org.apache.http.RequestLine;
 import org.apache.http.StatusLine;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.ThreadingBehavior;
+import org.apache.http.annotation.Contract;
 import org.apache.http.util.Args;
 import org.apache.http.util.CharArrayBuffer;
 
@@ -48,7 +49,7 @@ import org.apache.http.util.CharArrayBuf
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class BasicLineFormatter implements LineFormatter {
 
     /**

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicLineParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicLineParser.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicLineParser.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicLineParser.java Tue Jun  7 18:24:10 2016
@@ -33,7 +33,8 @@ import org.apache.http.ParseException;
 import org.apache.http.ProtocolVersion;
 import org.apache.http.RequestLine;
 import org.apache.http.StatusLine;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.ThreadingBehavior;
+import org.apache.http.annotation.Contract;
 import org.apache.http.protocol.HTTP;
 import org.apache.http.util.Args;
 import org.apache.http.util.CharArrayBuffer;
@@ -56,7 +57,7 @@ import org.apache.http.util.CharArrayBuf
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class BasicLineParser implements LineParser {
 
     /**

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicListHeaderIterator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicListHeaderIterator.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicListHeaderIterator.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicListHeaderIterator.java Tue Jun  7 18:24:10 2016
@@ -32,7 +32,6 @@ import java.util.NoSuchElementException;
 
 import org.apache.http.Header;
 import org.apache.http.HeaderIterator;
-import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.util.Args;
 import org.apache.http.util.Asserts;
 
@@ -42,7 +41,6 @@ import org.apache.http.util.Asserts;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class BasicListHeaderIterator implements HeaderIterator {
 
     /**

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicNameValuePair.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicNameValuePair.java?rev=1747290&r1=1747289&r2=1747290&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicNameValuePair.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/message/BasicNameValuePair.java Tue Jun  7 18:24:10 2016
@@ -30,7 +30,8 @@ package org.apache.http.message;
 import java.io.Serializable;
 
 import org.apache.http.NameValuePair;
-import org.apache.http.annotation.Immutable;
+import org.apache.http.annotation.ThreadingBehavior;
+import org.apache.http.annotation.Contract;
 import org.apache.http.util.Args;
 import org.apache.http.util.LangUtils;
 
@@ -39,7 +40,7 @@ import org.apache.http.util.LangUtils;
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class BasicNameValuePair implements NameValuePair, Cloneable, Serializable {
 
     private static final long serialVersionUID = -6437800749411518984L;




Mime
View raw message