hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1747291 [3/4] - in /httpcomponents/httpcore/trunk: ./ httpcore5-h2/src/main/java/org/apache/hc/core5/http2/hpack/ httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/ httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/io/ http...
Date Tue, 07 Jun 2016 18:26:46 GMT
Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/SimpleOutputBuffer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/SimpleOutputBuffer.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/SimpleOutputBuffer.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/SimpleOutputBuffer.java Tue Jun  7 18:26:44 2016
@@ -28,7 +28,6 @@ package org.apache.hc.core5.http.impl.ni
 
 import java.io.IOException;
 
-import org.apache.hc.core5.annotation.NotThreadSafe;
 import org.apache.hc.core5.http.nio.ContentEncoder;
 import org.apache.hc.core5.http.nio.ContentOutputBuffer;
 import org.apache.hc.core5.util.ByteBufferAllocator;
@@ -41,7 +40,6 @@ import org.apache.hc.core5.util.HeapByte
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class SimpleOutputBuffer extends ExpandableBuffer implements ContentOutputBuffer {
 
     private boolean endOfStream;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/UriHttpAsyncRequestHandlerMapper.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/UriHttpAsyncRequestHandlerMapper.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/UriHttpAsyncRequestHandlerMapper.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/UriHttpAsyncRequestHandlerMapper.java Tue Jun  7 18:26:44 2016
@@ -27,7 +27,8 @@
 
 package org.apache.hc.core5.http.impl.nio;
 
-import org.apache.hc.core5.annotation.ThreadSafe;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.HttpRequest;
 import org.apache.hc.core5.http.nio.HttpAsyncRequestHandler;
 import org.apache.hc.core5.http.nio.HttpAsyncRequestHandlerMapper;
@@ -51,7 +52,7 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.3
  */
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE)
 public class UriHttpAsyncRequestHandlerMapper implements HttpAsyncRequestHandlerMapper {
 
     private final UriPatternMatcher<HttpAsyncRequestHandler<?>> matcher;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/io/UriHttpRequestHandlerMapper.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/io/UriHttpRequestHandlerMapper.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/io/UriHttpRequestHandlerMapper.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/io/UriHttpRequestHandlerMapper.java Tue Jun  7 18:26:44 2016
@@ -27,7 +27,8 @@
 
 package org.apache.hc.core5.http.io;
 
-import org.apache.hc.core5.annotation.ThreadSafe;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.HttpRequest;
 import org.apache.hc.core5.http.protocol.HttpContext;
 import org.apache.hc.core5.http.protocol.UriPatternMatcher;
@@ -50,7 +51,7 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.3
  */
-@ThreadSafe // provided injected dependencies are thread-safe
+@Contract(threading = ThreadingBehavior.SAFE)
 public class UriHttpRequestHandlerMapper implements HttpRequestHandlerMapper {
 
     private final UriPatternMatcher<HttpRequestHandler> matcher;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/AbstractHeaderElementIterator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/AbstractHeaderElementIterator.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/AbstractHeaderElementIterator.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/AbstractHeaderElementIterator.java Tue Jun  7 18:26:44 2016
@@ -30,7 +30,6 @@ package org.apache.hc.core5.http.message
 import java.util.Iterator;
 import java.util.NoSuchElementException;
 
-import org.apache.hc.core5.annotation.NotThreadSafe;
 import org.apache.hc.core5.http.FormattedHeader;
 import org.apache.hc.core5.http.Header;
 import org.apache.hc.core5.util.Args;
@@ -40,7 +39,6 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 5.0
  */
-@NotThreadSafe
 abstract class AbstractHeaderElementIterator<T> implements Iterator<T> {
 
     private final Iterator<Header> headerIt;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/AbstractHttpMessage.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/AbstractHttpMessage.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/AbstractHttpMessage.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/AbstractHttpMessage.java Tue Jun  7 18:26:44 2016
@@ -27,7 +27,6 @@
 
 package org.apache.hc.core5.http.message;
 
-import org.apache.hc.core5.annotation.NotThreadSafe;
 import org.apache.hc.core5.http.HttpEntity;
 import org.apache.hc.core5.http.HttpMessage;
 import org.apache.hc.core5.util.Args;
@@ -37,7 +36,6 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public abstract class AbstractHttpMessage extends HeaderGroup implements HttpMessage<HttpEntity> {
 
     private static final long serialVersionUID = 1L;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeader.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeader.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeader.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeader.java Tue Jun  7 18:26:44 2016
@@ -30,7 +30,8 @@ package org.apache.hc.core5.http.message
 import java.io.Serializable;
 import java.util.Objects;
 
-import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.Header;
 import org.apache.hc.core5.util.Args;
 
@@ -39,7 +40,7 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class BasicHeader implements Header, Serializable {
 
     private static final long serialVersionUID = -5427236326487562174L;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeaderElement.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeaderElement.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeaderElement.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeaderElement.java Tue Jun  7 18:26:44 2016
@@ -27,7 +27,6 @@
 
 package org.apache.hc.core5.http.message;
 
-import org.apache.hc.core5.annotation.NotThreadSafe;
 import org.apache.hc.core5.http.HeaderElement;
 import org.apache.hc.core5.http.NameValuePair;
 import org.apache.hc.core5.util.Args;
@@ -37,7 +36,6 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class BasicHeaderElement implements HeaderElement {
 
     private static final NameValuePair[] EMPTY_NAME_VALUE_PAIR_ARRAY = new NameValuePair[0];

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeaderElementIterator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeaderElementIterator.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeaderElementIterator.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeaderElementIterator.java Tue Jun  7 18:26:44 2016
@@ -29,7 +29,6 @@ package org.apache.hc.core5.http.message
 
 import java.util.Iterator;
 
-import org.apache.hc.core5.annotation.NotThreadSafe;
 import org.apache.hc.core5.http.Header;
 import org.apache.hc.core5.http.HeaderElement;
 import org.apache.hc.core5.util.Args;
@@ -39,7 +38,6 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class BasicHeaderElementIterator extends AbstractHeaderElementIterator<HeaderElement> {
 
     private final HeaderValueParser parser;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeaderIterator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeaderIterator.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeaderIterator.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeaderIterator.java Tue Jun  7 18:26:44 2016
@@ -30,7 +30,6 @@ package org.apache.hc.core5.http.message
 import java.util.Iterator;
 import java.util.NoSuchElementException;
 
-import org.apache.hc.core5.annotation.NotThreadSafe;
 import org.apache.hc.core5.http.Header;
 import org.apache.hc.core5.util.Args;
 
@@ -39,7 +38,6 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class BasicHeaderIterator implements Iterator<Header> {
 
     /**

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeaderValueFormatter.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeaderValueFormatter.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeaderValueFormatter.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeaderValueFormatter.java Tue Jun  7 18:26:44 2016
@@ -27,7 +27,8 @@
 
 package org.apache.hc.core5.http.message;
 
-import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.HeaderElement;
 import org.apache.hc.core5.http.NameValuePair;
 import org.apache.hc.core5.util.Args;
@@ -38,7 +39,7 @@ import org.apache.hc.core5.util.CharArra
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class BasicHeaderValueFormatter implements HeaderValueFormatter {
 
     public final static BasicHeaderValueFormatter INSTANCE = new BasicHeaderValueFormatter();

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeaderValueParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeaderValueParser.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeaderValueParser.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeaderValueParser.java Tue Jun  7 18:26:44 2016
@@ -31,7 +31,8 @@ import java.util.ArrayList;
 import java.util.BitSet;
 import java.util.List;
 
-import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.HeaderElement;
 import org.apache.hc.core5.http.NameValuePair;
 import org.apache.hc.core5.util.Args;
@@ -41,7 +42,7 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class BasicHeaderValueParser implements HeaderValueParser {
 
     public final static BasicHeaderValueParser INSTANCE = new BasicHeaderValueParser();

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHttpRequest.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHttpRequest.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHttpRequest.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHttpRequest.java Tue Jun  7 18:26:44 2016
@@ -30,7 +30,6 @@ package org.apache.hc.core5.http.message
 import java.net.URI;
 import java.net.URISyntaxException;
 
-import org.apache.hc.core5.annotation.NotThreadSafe;
 import org.apache.hc.core5.http.HttpHost;
 import org.apache.hc.core5.http.HttpRequest;
 import org.apache.hc.core5.http.ProtocolVersion;
@@ -42,7 +41,6 @@ import org.apache.hc.core5.util.TextUtil
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class BasicHttpRequest extends AbstractHttpMessage implements HttpRequest {
 
     private static final long serialVersionUID = 1L;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHttpResponse.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHttpResponse.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHttpResponse.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHttpResponse.java Tue Jun  7 18:26:44 2016
@@ -29,7 +29,6 @@ package org.apache.hc.core5.http.message
 
 import java.util.Locale;
 
-import org.apache.hc.core5.annotation.NotThreadSafe;
 import org.apache.hc.core5.http.HttpResponse;
 import org.apache.hc.core5.http.ProtocolVersion;
 import org.apache.hc.core5.http.ReasonPhraseCatalog;
@@ -43,7 +42,6 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class BasicHttpResponse extends AbstractHttpMessage implements HttpResponse {
 
     private static final long serialVersionUID = 1L;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicLineFormatter.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicLineFormatter.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicLineFormatter.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicLineFormatter.java Tue Jun  7 18:26:44 2016
@@ -27,7 +27,8 @@
 
 package org.apache.hc.core5.http.message;
 
-import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.Header;
 import org.apache.hc.core5.http.ProtocolVersion;
 import org.apache.hc.core5.util.Args;
@@ -38,7 +39,7 @@ import org.apache.hc.core5.util.CharArra
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class BasicLineFormatter implements LineFormatter {
 
     public final static BasicLineFormatter INSTANCE = new BasicLineFormatter();

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicLineParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicLineParser.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicLineParser.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicLineParser.java Tue Jun  7 18:26:44 2016
@@ -29,7 +29,8 @@ package org.apache.hc.core5.http.message
 
 import java.util.BitSet;
 
-import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.Header;
 import org.apache.hc.core5.http.HttpVersion;
 import org.apache.hc.core5.http.ParseException;
@@ -43,7 +44,7 @@ import org.apache.hc.core5.util.TextUtil
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class BasicLineParser implements LineParser {
 
     public final static BasicLineParser INSTANCE = new BasicLineParser();

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicListHeaderIterator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicListHeaderIterator.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicListHeaderIterator.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicListHeaderIterator.java Tue Jun  7 18:26:44 2016
@@ -31,7 +31,6 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.NoSuchElementException;
 
-import org.apache.hc.core5.annotation.NotThreadSafe;
 import org.apache.hc.core5.http.Header;
 import org.apache.hc.core5.util.Args;
 import org.apache.hc.core5.util.Asserts;
@@ -41,7 +40,6 @@ import org.apache.hc.core5.util.Asserts;
  *
  * @since 4.0
  */
-@NotThreadSafe
 class BasicListHeaderIterator implements Iterator<Header> {
 
     /**

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicNameValuePair.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicNameValuePair.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicNameValuePair.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicNameValuePair.java Tue Jun  7 18:26:44 2016
@@ -29,7 +29,8 @@ package org.apache.hc.core5.http.message
 
 import java.io.Serializable;
 
-import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.NameValuePair;
 import org.apache.hc.core5.util.Args;
 
@@ -38,7 +39,7 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class BasicNameValuePair implements NameValuePair, Serializable {
 
     private static final long serialVersionUID = -6437800749411518984L;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicTokenIterator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicTokenIterator.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicTokenIterator.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicTokenIterator.java Tue Jun  7 18:26:44 2016
@@ -30,7 +30,6 @@ package org.apache.hc.core5.http.message
 import java.util.BitSet;
 import java.util.Iterator;
 
-import org.apache.hc.core5.annotation.NotThreadSafe;
 import org.apache.hc.core5.http.Header;
 import org.apache.hc.core5.util.TextUtils;
 
@@ -39,7 +38,6 @@ import org.apache.hc.core5.util.TextUtil
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class BasicTokenIterator extends AbstractHeaderElementIterator<String> {
 
     private static final BitSet COMMA = TokenParser.INIT_BITSET(',');

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BufferedHeader.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BufferedHeader.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BufferedHeader.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/BufferedHeader.java Tue Jun  7 18:26:44 2016
@@ -29,7 +29,6 @@ package org.apache.hc.core5.http.message
 
 import java.io.Serializable;
 
-import org.apache.hc.core5.annotation.NotThreadSafe;
 import org.apache.hc.core5.http.FormattedHeader;
 import org.apache.hc.core5.http.ParseException;
 import org.apache.hc.core5.util.Args;
@@ -41,7 +40,6 @@ import org.apache.hc.core5.util.CharArra
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class BufferedHeader implements FormattedHeader, Serializable {
 
     private static final long serialVersionUID = -2768352615787625448L;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/HeaderGroup.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/HeaderGroup.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/HeaderGroup.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/HeaderGroup.java Tue Jun  7 18:26:44 2016
@@ -34,7 +34,6 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
 
-import org.apache.hc.core5.annotation.NotThreadSafe;
 import org.apache.hc.core5.http.Header;
 import org.apache.hc.core5.http.ProtocolException;
 import org.apache.hc.core5.util.CharArrayBuffer;
@@ -47,7 +46,6 @@ import org.apache.hc.core5.util.CharArra
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class HeaderGroup implements Serializable {
 
 

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/LazyLaxLineParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/LazyLaxLineParser.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/LazyLaxLineParser.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/LazyLaxLineParser.java Tue Jun  7 18:26:44 2016
@@ -27,7 +27,6 @@
 
 package org.apache.hc.core5.http.message;
 
-import org.apache.hc.core5.annotation.Immutable;
 import org.apache.hc.core5.http.Header;
 import org.apache.hc.core5.http.ParseException;
 import org.apache.hc.core5.util.Args;
@@ -48,7 +47,6 @@ import org.apache.hc.core5.util.CharArra
  *
  * @since 5.0
  */
-@Immutable
 public class LazyLaxLineParser extends BasicLineParser {
 
     public final static LazyLaxLineParser INSTANCE = new LazyLaxLineParser();

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/LazyLineParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/LazyLineParser.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/LazyLineParser.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/LazyLineParser.java Tue Jun  7 18:26:44 2016
@@ -27,7 +27,8 @@
 
 package org.apache.hc.core5.http.message;
 
-import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.Header;
 import org.apache.hc.core5.http.ParseException;
 import org.apache.hc.core5.util.Args;
@@ -43,7 +44,7 @@ import org.apache.hc.core5.util.CharArra
  *
  * @since 5.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class LazyLineParser extends BasicLineParser {
 
     public final static LazyLineParser INSTANCE = new LazyLineParser();

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/ParserCursor.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/ParserCursor.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/ParserCursor.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/ParserCursor.java Tue Jun  7 18:26:44 2016
@@ -27,8 +27,6 @@
 
 package org.apache.hc.core5.http.message;
 
-import org.apache.hc.core5.annotation.NotThreadSafe;
-
 /**
  * This class represents a context of a parsing operation:
  * <ul>
@@ -38,7 +36,6 @@ import org.apache.hc.core5.annotation.No
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class ParserCursor {
 
     private final int lowerBound;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/RequestLine.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/RequestLine.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/RequestLine.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/RequestLine.java Tue Jun  7 18:26:44 2016
@@ -29,7 +29,8 @@ package org.apache.hc.core5.http.message
 
 import java.io.Serializable;
 
-import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.ProtocolVersion;
 import org.apache.hc.core5.util.Args;
 
@@ -38,7 +39,7 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public final class RequestLine implements Serializable {
 
     private static final long serialVersionUID = 2810581718468737193L;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/StatusLine.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/StatusLine.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/StatusLine.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/StatusLine.java Tue Jun  7 18:26:44 2016
@@ -29,7 +29,8 @@ package org.apache.hc.core5.http.message
 
 import java.io.Serializable;
 
-import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.ProtocolVersion;
 import org.apache.hc.core5.util.Args;
 
@@ -38,7 +39,7 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public final class StatusLine implements Serializable {
 
     private static final long serialVersionUID = -2443303766890459269L;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/TokenParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/TokenParser.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/TokenParser.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/message/TokenParser.java Tue Jun  7 18:26:44 2016
@@ -29,7 +29,8 @@ package org.apache.hc.core5.http.message
 
 import java.util.BitSet;
 
-import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.util.Args;
 
 /**
@@ -40,7 +41,7 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.4
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class TokenParser {
 
     public static BitSet INIT_BITSET(final int ... b) {

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/ContentBufferEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/ContentBufferEntity.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/ContentBufferEntity.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/ContentBufferEntity.java Tue Jun  7 18:26:44 2016
@@ -27,7 +27,6 @@
 
 package org.apache.hc.core5.http.nio.entity;
 
-import org.apache.hc.core5.annotation.NotThreadSafe;
 import org.apache.hc.core5.http.HttpEntity;
 import org.apache.hc.core5.http.entity.BasicHttpEntity;
 import org.apache.hc.core5.http.nio.ContentInputBuffer;
@@ -39,7 +38,6 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class ContentBufferEntity extends BasicHttpEntity {
 
     private final HttpEntity wrappedEntity;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/ContentInputStream.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/ContentInputStream.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/ContentInputStream.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/ContentInputStream.java Tue Jun  7 18:26:44 2016
@@ -30,7 +30,6 @@ package org.apache.hc.core5.http.nio.ent
 import java.io.IOException;
 import java.io.InputStream;
 
-import org.apache.hc.core5.annotation.NotThreadSafe;
 import org.apache.hc.core5.http.nio.ContentInputBuffer;
 import org.apache.hc.core5.util.Args;
 
@@ -39,7 +38,6 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class ContentInputStream extends InputStream {
 
     private final ContentInputBuffer buffer;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/ContentOutputStream.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/ContentOutputStream.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/ContentOutputStream.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/ContentOutputStream.java Tue Jun  7 18:26:44 2016
@@ -30,7 +30,6 @@ package org.apache.hc.core5.http.nio.ent
 import java.io.IOException;
 import java.io.OutputStream;
 
-import org.apache.hc.core5.annotation.NotThreadSafe;
 import org.apache.hc.core5.http.nio.ContentOutputBuffer;
 import org.apache.hc.core5.util.Args;
 
@@ -39,7 +38,6 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class ContentOutputStream extends OutputStream {
 
     private final ContentOutputBuffer buffer;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/EntityAsyncContentProducer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/EntityAsyncContentProducer.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/EntityAsyncContentProducer.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/EntityAsyncContentProducer.java Tue Jun  7 18:26:44 2016
@@ -33,7 +33,6 @@ import java.nio.ByteBuffer;
 import java.nio.channels.Channels;
 import java.nio.channels.ReadableByteChannel;
 
-import org.apache.hc.core5.annotation.NotThreadSafe;
 import org.apache.hc.core5.http.HttpEntity;
 import org.apache.hc.core5.http.nio.ContentEncoder;
 import org.apache.hc.core5.http.nio.IOControl;
@@ -46,7 +45,6 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.2
  */
-@NotThreadSafe
 public class EntityAsyncContentProducer implements HttpAsyncContentProducer {
 
     private final HttpEntity entity;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/NByteArrayEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/NByteArrayEntity.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/NByteArrayEntity.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/NByteArrayEntity.java Tue Jun  7 18:26:44 2016
@@ -33,7 +33,6 @@ import java.io.InputStream;
 import java.io.OutputStream;
 import java.nio.ByteBuffer;
 
-import org.apache.hc.core5.annotation.NotThreadSafe;
 import org.apache.hc.core5.http.entity.AbstractHttpEntity;
 import org.apache.hc.core5.http.entity.ContentType;
 import org.apache.hc.core5.http.nio.ContentEncoder;
@@ -46,7 +45,6 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class NByteArrayEntity extends AbstractHttpEntity implements HttpAsyncContentProducer {
 
     private final byte[] b;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/NFileEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/NFileEntity.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/NFileEntity.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/NFileEntity.java Tue Jun  7 18:26:44 2016
@@ -35,7 +35,6 @@ import java.io.OutputStream;
 import java.io.RandomAccessFile;
 import java.nio.channels.FileChannel;
 
-import org.apache.hc.core5.annotation.NotThreadSafe;
 import org.apache.hc.core5.http.entity.AbstractHttpEntity;
 import org.apache.hc.core5.http.entity.ContentType;
 import org.apache.hc.core5.http.impl.nio.ContentEncoderChannel;
@@ -52,7 +51,6 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@NotThreadSafe
 public class NFileEntity extends AbstractHttpEntity implements HttpAsyncContentProducer {
 
     private final File file;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/NStringEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/NStringEntity.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/NStringEntity.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/NStringEntity.java Tue Jun  7 18:26:44 2016
@@ -36,7 +36,6 @@ import java.nio.ByteBuffer;
 import java.nio.charset.Charset;
 import java.nio.charset.StandardCharsets;
 
-import org.apache.hc.core5.annotation.NotThreadSafe;
 import org.apache.hc.core5.http.entity.AbstractHttpEntity;
 import org.apache.hc.core5.http.entity.ContentType;
 import org.apache.hc.core5.http.nio.ContentEncoder;
@@ -50,7 +49,6 @@ import org.apache.hc.core5.util.Args;
  * @since 4.0
  *
  */
-@NotThreadSafe
 public class NStringEntity extends AbstractHttpEntity implements HttpAsyncContentProducer {
 
     private final byte[] b;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/pool/io/BasicConnFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/pool/io/BasicConnFactory.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/pool/io/BasicConnFactory.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/pool/io/BasicConnFactory.java Tue Jun  7 18:26:44 2016
@@ -33,7 +33,8 @@ import java.net.Socket;
 import javax.net.SocketFactory;
 import javax.net.ssl.SSLSocketFactory;
 
-import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.HttpHost;
 import org.apache.hc.core5.http.config.ConnectionConfig;
 import org.apache.hc.core5.http.config.SocketConfig;
@@ -49,7 +50,7 @@ import org.apache.hc.core5.pool.io.ConnF
  * @see HttpHost
  * @since 4.2
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL)
 public class BasicConnFactory implements ConnFactory<HttpHost, HttpClientConnection> {
 
     private final SocketFactory plainfactory;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/pool/io/BasicConnPool.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/pool/io/BasicConnPool.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/pool/io/BasicConnPool.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/pool/io/BasicConnPool.java Tue Jun  7 18:26:44 2016
@@ -28,7 +28,8 @@ package org.apache.hc.core5.http.pool.io
 
 import java.util.concurrent.atomic.AtomicLong;
 
-import org.apache.hc.core5.annotation.ThreadSafe;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.HttpHost;
 import org.apache.hc.core5.http.config.ConnectionConfig;
 import org.apache.hc.core5.http.config.SocketConfig;
@@ -46,7 +47,7 @@ import org.apache.hc.core5.pool.io.ConnF
  * @see HttpHost
  * @since 4.2
  */
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
 public class BasicConnPool extends AbstractConnPool<HttpHost, HttpClientConnection, BasicPoolEntry> {
 
     public static final int DEFAULT_MAX_TOTAL_CONNECTIONS = 25;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/pool/io/BasicPoolEntry.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/pool/io/BasicPoolEntry.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/pool/io/BasicPoolEntry.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/pool/io/BasicPoolEntry.java Tue Jun  7 18:26:44 2016
@@ -28,7 +28,8 @@ package org.apache.hc.core5.http.pool.io
 
 import java.io.IOException;
 
-import org.apache.hc.core5.annotation.ThreadSafe;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.HttpHost;
 import org.apache.hc.core5.http.io.HttpClientConnection;
 import org.apache.hc.core5.pool.PoolEntry;
@@ -41,7 +42,7 @@ import org.apache.hc.core5.pool.PoolEntr
  * @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/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/pool/nio/BasicNIOConnFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/pool/nio/BasicNIOConnFactory.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/pool/nio/BasicNIOConnFactory.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/pool/nio/BasicNIOConnFactory.java Tue Jun  7 18:26:44 2016
@@ -30,7 +30,8 @@ import java.io.IOException;
 
 import javax.net.ssl.SSLContext;
 
-import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.HttpHost;
 import org.apache.hc.core5.http.HttpRequest;
 import org.apache.hc.core5.http.HttpResponse;
@@ -54,7 +55,7 @@ import org.apache.hc.core5.util.ByteBuff
  *
  * @since 4.2
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL)
 public class BasicNIOConnFactory implements NIOConnFactory<HttpHost, NHttpClientConnection> {
 
     private final NHttpConnectionFactory<? extends NHttpClientConnection> plainFactory;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/pool/nio/BasicNIOConnPool.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/pool/nio/BasicNIOConnPool.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/pool/nio/BasicNIOConnPool.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/pool/nio/BasicNIOConnPool.java Tue Jun  7 18:26:44 2016
@@ -32,7 +32,8 @@ import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicLong;
 
-import org.apache.hc.core5.annotation.ThreadSafe;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.concurrent.FutureCallback;
 import org.apache.hc.core5.http.HttpHost;
 import org.apache.hc.core5.http.config.ConnectionConfig;
@@ -52,7 +53,7 @@ import org.apache.hc.core5.reactor.Conne
  * @see HttpHost
  * @since 4.2
  */
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE)
 public class BasicNIOConnPool extends AbstractNIOConnPool<HttpHost, NHttpClientConnection, BasicNIOPoolEntry> {
 
     private static final AtomicLong COUNTER = new AtomicLong();

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/pool/nio/BasicNIOPoolEntry.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/pool/nio/BasicNIOPoolEntry.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/pool/nio/BasicNIOPoolEntry.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/pool/nio/BasicNIOPoolEntry.java Tue Jun  7 18:26:44 2016
@@ -28,7 +28,8 @@ package org.apache.hc.core5.http.pool.ni
 
 import java.io.IOException;
 
-import org.apache.hc.core5.annotation.ThreadSafe;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.HttpHost;
 import org.apache.hc.core5.http.nio.NHttpClientConnection;
 import org.apache.hc.core5.pool.PoolEntry;
@@ -41,7 +42,7 @@ import org.apache.hc.core5.pool.PoolEntr
  * @see HttpHost
  * @since 4.2
  */
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE)
 public class BasicNIOPoolEntry extends PoolEntry<HttpHost, NHttpClientConnection> {
 
     private volatile int socketTimeout;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/BasicHttpContext.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/BasicHttpContext.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/BasicHttpContext.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/BasicHttpContext.java Tue Jun  7 18:26:44 2016
@@ -30,7 +30,8 @@ package org.apache.hc.core5.http.protoco
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
-import org.apache.hc.core5.annotation.ThreadSafe;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.HttpVersion;
 import org.apache.hc.core5.http.ProtocolVersion;
 import org.apache.hc.core5.util.Args;
@@ -43,7 +44,7 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
 public class BasicHttpContext implements HttpContext {
 
     private final HttpContext parentContext;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/ChainBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/ChainBuilder.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/ChainBuilder.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/ChainBuilder.java Tue Jun  7 18:26:44 2016
@@ -32,8 +32,6 @@ import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.Map;
 
-import org.apache.hc.core5.annotation.NotThreadSafe;
-
 /**
  * Builder class to build a linked list (chain) of unique class instances. Each class can have
  * only one instance in the list. Useful for building lists of protocol interceptors.
@@ -42,7 +40,6 @@ import org.apache.hc.core5.annotation.No
  *
  * @since 4.3
  */
-@NotThreadSafe
 final class ChainBuilder<E> {
 
     private final LinkedList<E> list;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/HttpCoreContext.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/HttpCoreContext.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/HttpCoreContext.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/HttpCoreContext.java Tue Jun  7 18:26:44 2016
@@ -27,7 +27,6 @@
 
 package org.apache.hc.core5.http.protocol;
 
-import org.apache.hc.core5.annotation.NotThreadSafe;
 import org.apache.hc.core5.http.HttpConnection;
 import org.apache.hc.core5.http.HttpRequest;
 import org.apache.hc.core5.http.HttpResponse;
@@ -40,7 +39,6 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.3
  */
-@NotThreadSafe
 public class HttpCoreContext implements HttpContext {
 
     /**

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/HttpDateGenerator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/HttpDateGenerator.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/HttpDateGenerator.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/HttpDateGenerator.java Tue Jun  7 18:26:44 2016
@@ -33,15 +33,15 @@ import java.util.Date;
 import java.util.Locale;
 import java.util.TimeZone;
 
-import org.apache.hc.core5.annotation.GuardedBy;
-import org.apache.hc.core5.annotation.ThreadSafe;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 
 /**
  * Generates a date in the format required by the HTTP protocol.
  *
  * @since 4.0
  */
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE)
 public class HttpDateGenerator {
 
     /** Date format pattern used to generate the header in RFC 1123 format. */
@@ -51,11 +51,8 @@ public class HttpDateGenerator {
     /** The time zone to use in the date header. */
     public static final TimeZone GMT = TimeZone.getTimeZone("GMT");
 
-    @GuardedBy("this")
     private final DateFormat dateformat;
-    @GuardedBy("this")
     private long dateAsLong = 0L;
-    @GuardedBy("this")
     private String dateAsText = null;
 
     public HttpDateGenerator() {

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/ImmutableHttpProcessor.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/ImmutableHttpProcessor.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/ImmutableHttpProcessor.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/ImmutableHttpProcessor.java Tue Jun  7 18:26:44 2016
@@ -29,7 +29,8 @@ package org.apache.hc.core5.http.protoco
 import java.io.IOException;
 import java.util.List;
 
-import org.apache.hc.core5.annotation.ThreadSafe;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.HttpException;
 import org.apache.hc.core5.http.HttpRequest;
 import org.apache.hc.core5.http.HttpRequestInterceptor;
@@ -41,7 +42,7 @@ import org.apache.hc.core5.http.HttpResp
  *
  * @since 4.1
  */
-@ThreadSafe // provided injected dependencies are immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL)
 public final class ImmutableHttpProcessor implements HttpProcessor {
 
     private final HttpRequestInterceptor[] requestInterceptors;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestConnControl.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestConnControl.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestConnControl.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestConnControl.java Tue Jun  7 18:26:44 2016
@@ -29,7 +29,8 @@ package org.apache.hc.core5.http.protoco
 
 import java.io.IOException;
 
-import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.HeaderElements;
 import org.apache.hc.core5.http.HttpException;
 import org.apache.hc.core5.http.HttpHeaders;
@@ -45,7 +46,7 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class RequestConnControl implements HttpRequestInterceptor {
 
     public RequestConnControl() {

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestContent.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestContent.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestContent.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestContent.java Tue Jun  7 18:26:44 2016
@@ -30,7 +30,8 @@ package org.apache.hc.core5.http.protoco
 import java.io.IOException;
 import java.util.Set;
 
-import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.HeaderElements;
 import org.apache.hc.core5.http.HttpEntity;
 import org.apache.hc.core5.http.HttpException;
@@ -53,7 +54,7 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class RequestContent implements HttpRequestInterceptor {
 
     private final boolean overwrite;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestDate.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestDate.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestDate.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestDate.java Tue Jun  7 18:26:44 2016
@@ -29,7 +29,8 @@ package org.apache.hc.core5.http.protoco
 
 import java.io.IOException;
 
-import org.apache.hc.core5.annotation.ThreadSafe;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.HttpEntity;
 import org.apache.hc.core5.http.HttpException;
 import org.apache.hc.core5.http.HttpHeaders;
@@ -44,7 +45,7 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE)
 public class RequestDate implements HttpRequestInterceptor {
 
     private static final HttpDateGenerator DATE_GENERATOR = new HttpDateGenerator();

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestExpectContinue.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestExpectContinue.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestExpectContinue.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestExpectContinue.java Tue Jun  7 18:26:44 2016
@@ -29,7 +29,8 @@ package org.apache.hc.core5.http.protoco
 
 import java.io.IOException;
 
-import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.HeaderElements;
 import org.apache.hc.core5.http.HttpEntity;
 import org.apache.hc.core5.http.HttpException;
@@ -47,7 +48,7 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class RequestExpectContinue implements HttpRequestInterceptor {
 
     public RequestExpectContinue() {

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestTargetHost.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestTargetHost.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestTargetHost.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestTargetHost.java Tue Jun  7 18:26:44 2016
@@ -30,7 +30,8 @@ package org.apache.hc.core5.http.protoco
 import java.io.IOException;
 import java.net.InetSocketAddress;
 
-import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.HttpConnection;
 import org.apache.hc.core5.http.HttpException;
 import org.apache.hc.core5.http.HttpHeaders;
@@ -47,7 +48,7 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class RequestTargetHost implements HttpRequestInterceptor {
 
     public RequestTargetHost() {

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestUserAgent.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestUserAgent.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestUserAgent.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestUserAgent.java Tue Jun  7 18:26:44 2016
@@ -29,7 +29,8 @@ package org.apache.hc.core5.http.protoco
 
 import java.io.IOException;
 
-import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.HttpException;
 import org.apache.hc.core5.http.HttpHeaders;
 import org.apache.hc.core5.http.HttpRequest;
@@ -42,7 +43,7 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class RequestUserAgent implements HttpRequestInterceptor {
 
     private final String userAgent;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestValidateHost.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestValidateHost.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestValidateHost.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestValidateHost.java Tue Jun  7 18:26:44 2016
@@ -29,7 +29,8 @@ package org.apache.hc.core5.http.protoco
 
 import java.io.IOException;
 
-import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.Header;
 import org.apache.hc.core5.http.HttpException;
 import org.apache.hc.core5.http.HttpHeaders;
@@ -48,7 +49,7 @@ import org.apache.hc.core5.util.TextUtil
  *
  * @since 5.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class RequestValidateHost implements HttpRequestInterceptor {
 
     public RequestValidateHost() {

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/ResponseConnControl.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/ResponseConnControl.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/ResponseConnControl.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/ResponseConnControl.java Tue Jun  7 18:26:44 2016
@@ -29,7 +29,8 @@ package org.apache.hc.core5.http.protoco
 
 import java.io.IOException;
 
-import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.Header;
 import org.apache.hc.core5.http.HeaderElements;
 import org.apache.hc.core5.http.HttpEntity;
@@ -51,7 +52,7 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class ResponseConnControl implements HttpResponseInterceptor {
 
     public ResponseConnControl() {

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/ResponseContent.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/ResponseContent.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/ResponseContent.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/ResponseContent.java Tue Jun  7 18:26:44 2016
@@ -30,7 +30,8 @@ package org.apache.hc.core5.http.protoco
 import java.io.IOException;
 import java.util.Set;
 
-import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.HeaderElements;
 import org.apache.hc.core5.http.HttpEntity;
 import org.apache.hc.core5.http.HttpException;
@@ -54,7 +55,7 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class ResponseContent implements HttpResponseInterceptor {
 
     private final boolean overwrite;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/ResponseDate.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/ResponseDate.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/ResponseDate.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/ResponseDate.java Tue Jun  7 18:26:44 2016
@@ -29,7 +29,8 @@ package org.apache.hc.core5.http.protoco
 
 import java.io.IOException;
 
-import org.apache.hc.core5.annotation.ThreadSafe;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.HttpException;
 import org.apache.hc.core5.http.HttpHeaders;
 import org.apache.hc.core5.http.HttpResponse;
@@ -44,7 +45,7 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE)
 public class ResponseDate implements HttpResponseInterceptor {
 
     private static final HttpDateGenerator DATE_GENERATOR = new HttpDateGenerator();

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/ResponseServer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/ResponseServer.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/ResponseServer.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/ResponseServer.java Tue Jun  7 18:26:44 2016
@@ -29,7 +29,8 @@ package org.apache.hc.core5.http.protoco
 
 import java.io.IOException;
 
-import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.HttpException;
 import org.apache.hc.core5.http.HttpHeaders;
 import org.apache.hc.core5.http.HttpResponse;
@@ -42,7 +43,7 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class ResponseServer implements HttpResponseInterceptor {
 
     private final String originServer;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/UriPatternMatcher.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/UriPatternMatcher.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/UriPatternMatcher.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/UriPatternMatcher.java Tue Jun  7 18:26:44 2016
@@ -30,8 +30,8 @@ package org.apache.hc.core5.http.protoco
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.hc.core5.annotation.GuardedBy;
-import org.apache.hc.core5.annotation.ThreadSafe;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.util.Args;
 
 /**
@@ -49,10 +49,9 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE)
 public class UriPatternMatcher<T> {
 
-    @GuardedBy("this")
     private final Map<String, T> map;
 
     public UriPatternMatcher() {

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/PoolEntry.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/PoolEntry.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/PoolEntry.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/PoolEntry.java Tue Jun  7 18:26:44 2016
@@ -28,8 +28,8 @@ package org.apache.hc.core5.pool;
 
 import java.util.concurrent.TimeUnit;
 
-import org.apache.hc.core5.annotation.GuardedBy;
-import org.apache.hc.core5.annotation.ThreadSafe;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.util.Args;
 
 /**
@@ -48,7 +48,7 @@ import org.apache.hc.core5.util.Args;
  * @param <C> the connection type.
  * @since 4.2
  */
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
 public abstract class PoolEntry<T, C> {
 
     private final String id;
@@ -57,10 +57,8 @@ public abstract class PoolEntry<T, C> {
     private final long created;
     private final long validityDeadline;
 
-    @GuardedBy("this")
     private long updated;
 
-    @GuardedBy("this")
     private long expiry;
 
     private volatile Object state;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/PoolStats.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/PoolStats.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/PoolStats.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/PoolStats.java Tue Jun  7 18:26:44 2016
@@ -28,7 +28,8 @@ package org.apache.hc.core5.pool;
 
 import java.io.Serializable;
 
-import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 
 /**
  * Pool statistics.
@@ -38,7 +39,7 @@ import org.apache.hc.core5.annotation.Im
  *
  * @since 4.2
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class PoolStats implements Serializable {
 
     private static final long serialVersionUID = -2807686144795228544L;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/io/AbstractConnPool.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/io/AbstractConnPool.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/io/AbstractConnPool.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/io/AbstractConnPool.java Tue Jun  7 18:26:44 2016
@@ -40,7 +40,8 @@ import java.util.concurrent.TimeoutExcep
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantLock;
 
-import org.apache.hc.core5.annotation.ThreadSafe;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.concurrent.FutureCallback;
 import org.apache.hc.core5.pool.ConnPool;
 import org.apache.hc.core5.pool.ConnPoolControl;
@@ -65,7 +66,7 @@ import org.apache.hc.core5.util.Asserts;
  * @param <E> the type of the pool entry containing a pooled connection.
  * @since 4.2
  */
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
 public abstract class AbstractConnPool<T, C, E extends PoolEntry<T, C>>
                                                implements ConnPool<T, E>, ConnPoolControl<T> {
 

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/io/PoolEntryFuture.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/io/PoolEntryFuture.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/io/PoolEntryFuture.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/io/PoolEntryFuture.java Tue Jun  7 18:26:44 2016
@@ -35,11 +35,12 @@ import java.util.concurrent.TimeoutExcep
 import java.util.concurrent.locks.Condition;
 import java.util.concurrent.locks.Lock;
 
-import org.apache.hc.core5.annotation.ThreadSafe;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.concurrent.FutureCallback;
 import org.apache.hc.core5.util.Args;
 
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
 abstract class PoolEntryFuture<T> implements Future<T> {
 
     private final Lock lock;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/io/RouteSpecificPool.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/io/RouteSpecificPool.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/io/RouteSpecificPool.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/io/RouteSpecificPool.java Tue Jun  7 18:26:44 2016
@@ -31,12 +31,10 @@ import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.Set;
 
-import org.apache.hc.core5.annotation.NotThreadSafe;
 import org.apache.hc.core5.pool.PoolEntry;
 import org.apache.hc.core5.util.Args;
 import org.apache.hc.core5.util.Asserts;
 
-@NotThreadSafe
 abstract class RouteSpecificPool<T, C, E extends PoolEntry<T, C>> {
 
     private final T route;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/nio/AbstractNIOConnPool.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/nio/AbstractNIOConnPool.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/nio/AbstractNIOConnPool.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/nio/AbstractNIOConnPool.java Tue Jun  7 18:26:44 2016
@@ -43,7 +43,8 @@ import java.util.concurrent.atomic.Atomi
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantLock;
 
-import org.apache.hc.core5.annotation.ThreadSafe;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.concurrent.BasicFuture;
 import org.apache.hc.core5.concurrent.FutureCallback;
 import org.apache.hc.core5.pool.ConnPool;
@@ -68,7 +69,7 @@ import org.apache.hc.core5.util.Asserts;
  *
  * @since 4.2
  */
-@ThreadSafe
+@Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
 public abstract class AbstractNIOConnPool<T, C, E extends PoolEntry<T, C>>
                                                   implements ConnPool<T, E>, ConnPoolControl<T> {
 

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/nio/LeaseRequest.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/nio/LeaseRequest.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/nio/LeaseRequest.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/nio/LeaseRequest.java Tue Jun  7 18:26:44 2016
@@ -28,11 +28,12 @@ package org.apache.hc.core5.pool.nio;
 
 import java.util.concurrent.atomic.AtomicBoolean;
 
-import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.concurrent.BasicFuture;
 import org.apache.hc.core5.pool.PoolEntry;
 
-@Immutable
+@Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
 class LeaseRequest<T, C, E extends PoolEntry<T, C>> {
 
     private final T route;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/nio/RouteSpecificPool.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/nio/RouteSpecificPool.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/nio/RouteSpecificPool.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/pool/nio/RouteSpecificPool.java Tue Jun  7 18:26:44 2016
@@ -34,14 +34,12 @@ import java.util.LinkedList;
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.hc.core5.annotation.NotThreadSafe;
 import org.apache.hc.core5.concurrent.BasicFuture;
 import org.apache.hc.core5.pool.PoolEntry;
 import org.apache.hc.core5.reactor.SessionRequest;
 import org.apache.hc.core5.util.Args;
 import org.apache.hc.core5.util.Asserts;
 
-@NotThreadSafe
 abstract class RouteSpecificPool<T, C, E extends PoolEntry<T, C>> {
 
     private final T route;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/AbstractIODispatch.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/AbstractIODispatch.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/AbstractIODispatch.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/AbstractIODispatch.java Tue Jun  7 18:26:44 2016
@@ -29,7 +29,6 @@ package org.apache.hc.core5.reactor;
 
 import java.io.IOException;
 
-import org.apache.hc.core5.annotation.Immutable;
 import org.apache.hc.core5.reactor.ssl.SSLIOSession;
 import org.apache.hc.core5.util.Asserts;
 
@@ -40,7 +39,6 @@ import org.apache.hc.core5.util.Asserts;
  * @param <T> the connection type.
  * @since 4.2
  */
-@Immutable // provided injected dependencies are immutable
 public abstract class AbstractIODispatch<T> implements IOEventDispatch {
 
     protected abstract T createConnection(IOSession session);

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/AbstractIOReactor.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/AbstractIOReactor.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/AbstractIOReactor.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/AbstractIOReactor.java Tue Jun  7 18:26:44 2016
@@ -41,7 +41,6 @@ import java.util.Queue;
 import java.util.Set;
 import java.util.concurrent.ConcurrentLinkedQueue;
 
-import org.apache.hc.core5.annotation.ThreadSafe;
 import org.apache.hc.core5.util.Args;
 
 /**
@@ -51,7 +50,6 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@ThreadSafe // public methods only
 public abstract class AbstractIOReactor implements IOReactor {
 
     private volatile IOReactorStatus status;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/AbstractMultiworkerIOReactor.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/AbstractMultiworkerIOReactor.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/AbstractMultiworkerIOReactor.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/AbstractMultiworkerIOReactor.java Tue Jun  7 18:26:44 2016
@@ -42,7 +42,6 @@ import java.util.List;
 import java.util.concurrent.ThreadFactory;
 import java.util.concurrent.atomic.AtomicLong;
 
-import org.apache.hc.core5.annotation.ThreadSafe;
 import org.apache.hc.core5.util.Args;
 import org.apache.hc.core5.util.Asserts;
 
@@ -86,7 +85,6 @@ import org.apache.hc.core5.util.Asserts;
  *
  * @since 4.0
  */
-@ThreadSafe // public methods only
 public abstract class AbstractMultiworkerIOReactor implements IOReactor {
 
     protected volatile IOReactorStatus status;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/BaseIOReactor.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/BaseIOReactor.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/BaseIOReactor.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/BaseIOReactor.java Tue Jun  7 18:26:44 2016
@@ -34,7 +34,6 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
 
-import org.apache.hc.core5.annotation.ThreadSafe;
 import org.apache.hc.core5.util.Args;
 
 /**
@@ -46,7 +45,6 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@ThreadSafe // public methods only
 public class BaseIOReactor extends AbstractIOReactor {
 
     private final long timeoutCheckInterval;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/ChannelEntry.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/ChannelEntry.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/ChannelEntry.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/ChannelEntry.java Tue Jun  7 18:26:44 2016
@@ -29,7 +29,6 @@ package org.apache.hc.core5.reactor;
 
 import java.nio.channels.SocketChannel;
 
-import org.apache.hc.core5.annotation.Immutable;
 import org.apache.hc.core5.util.Args;
 
 /**
@@ -39,7 +38,6 @@ import org.apache.hc.core5.util.Args;
  *
  * @since 4.0
  */
-@Immutable
 public class ChannelEntry {
 
     private final SocketChannel channel;

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/DefaultConnectingIOReactor.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/DefaultConnectingIOReactor.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/DefaultConnectingIOReactor.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/DefaultConnectingIOReactor.java Tue Jun  7 18:26:44 2016
@@ -40,7 +40,6 @@ import java.util.Set;
 import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.concurrent.ThreadFactory;
 
-import org.apache.hc.core5.annotation.ThreadSafe;
 import org.apache.hc.core5.util.Asserts;
 
 /**
@@ -50,7 +49,6 @@ import org.apache.hc.core5.util.Asserts;
  *
  * @since 4.0
  */
-@ThreadSafe // public methods only
 public class DefaultConnectingIOReactor extends AbstractMultiworkerIOReactor
         implements ConnectingIOReactor {
 

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/DefaultListeningIOReactor.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/DefaultListeningIOReactor.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/DefaultListeningIOReactor.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/DefaultListeningIOReactor.java Tue Jun  7 18:26:44 2016
@@ -42,7 +42,6 @@ import java.util.Set;
 import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.concurrent.ThreadFactory;
 
-import org.apache.hc.core5.annotation.ThreadSafe;
 import org.apache.hc.core5.util.Asserts;
 
 /**
@@ -52,7 +51,6 @@ import org.apache.hc.core5.util.Asserts;
  *
  * @since 4.0
  */
-@ThreadSafe // public methods only
 public class DefaultListeningIOReactor extends AbstractMultiworkerIOReactor
         implements ListeningIOReactor {
 

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/ExceptionEvent.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/ExceptionEvent.java?rev=1747291&r1=1747290&r2=1747291&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/ExceptionEvent.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/ExceptionEvent.java Tue Jun  7 18:26:44 2016
@@ -29,14 +29,15 @@ package org.apache.hc.core5.reactor;
 
 import java.util.Date;
 
-import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 
 /**
  * A {@link Throwable} instance along with a time stamp.
  *
  * @since 4.0
  */
-@Immutable
+@Contract(threading = ThreadingBehavior.IMMUTABLE)
 public class ExceptionEvent {
 
     private final Throwable ex;




Mime
View raw message