hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1142715 [2/3] - in /httpcomponents/httpcore/trunk: httpcore-nio/src/main/java/org/apache/http/impl/nio/ httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/ httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/ httpcore-nio/s...
Date Mon, 04 Jul 2011 15:26:16 GMT
Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpServiceHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpServiceHandler.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpServiceHandler.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpServiceHandler.java Mon Jul  4 15:26:11 2011
@@ -44,6 +44,7 @@ import org.apache.http.MethodNotSupporte
 import org.apache.http.ProtocolVersion;
 import org.apache.http.ProtocolException;
 import org.apache.http.UnsupportedHttpVersionException;
+import org.apache.http.annotation.ThreadSafe;
 import org.apache.http.entity.ByteArrayEntity;
 import org.apache.http.nio.ContentDecoder;
 import org.apache.http.nio.ContentEncoder;
@@ -100,6 +101,7 @@ import org.apache.http.util.EntityUtils;
  *
  * @since 4.0
  */
+@ThreadSafe // provided injected dependencies are immutable or thread safe
 public class ThrottlingHttpServiceHandler extends NHttpHandlerBase
                                           implements NHttpServiceHandler {
 

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/util/DirectByteBufferAllocator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/util/DirectByteBufferAllocator.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/util/DirectByteBufferAllocator.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/util/DirectByteBufferAllocator.java Mon Jul  4 15:26:11 2011
@@ -29,12 +29,15 @@ package org.apache.http.nio.util;
 
 import java.nio.ByteBuffer;
 
+import org.apache.http.annotation.Immutable;
+
 /**
  * Allocates {@link ByteBuffer} instances using
  * {@link ByteBuffer#allocateDirect(int)}.
  *
  * @since 4.0
  */
+@Immutable
 public class DirectByteBufferAllocator implements ByteBufferAllocator {
 
     public ByteBuffer allocate(int size) {

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/util/ExpandableBuffer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/util/ExpandableBuffer.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/util/ExpandableBuffer.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/util/ExpandableBuffer.java Mon Jul  4 15:26:11 2011
@@ -29,6 +29,7 @@ package org.apache.http.nio.util;
 
 import java.nio.ByteBuffer;
 
+import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.io.BufferInfo;
 
 /**
@@ -41,6 +42,7 @@ import org.apache.http.io.BufferInfo;
  * @since 4.0
  */
 @SuppressWarnings("deprecation")
+@NotThreadSafe
 public class ExpandableBuffer implements BufferInfo, org.apache.http.nio.util.BufferInfo {
 
     public final static int INPUT_MODE = 0;

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/util/HeapByteBufferAllocator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/util/HeapByteBufferAllocator.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/util/HeapByteBufferAllocator.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/util/HeapByteBufferAllocator.java Mon Jul  4 15:26:11 2011
@@ -29,12 +29,15 @@ package org.apache.http.nio.util;
 
 import java.nio.ByteBuffer;
 
+import org.apache.http.annotation.Immutable;
+
 /**
  * Allocates {@link ByteBuffer} instances using
  * {@link ByteBuffer#allocate(int)}.
  *
  * @since 4.0
  */
+@Immutable
 public class HeapByteBufferAllocator implements ByteBufferAllocator {
 
     public ByteBuffer allocate(int size) {

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedInputBuffer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedInputBuffer.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedInputBuffer.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedInputBuffer.java Mon Jul  4 15:26:11 2011
@@ -31,6 +31,7 @@ import java.io.InterruptedIOException;
 import java.util.concurrent.locks.Condition;
 import java.util.concurrent.locks.ReentrantLock;
 
+import org.apache.http.annotation.ThreadSafe;
 import org.apache.http.nio.ContentDecoder;
 import org.apache.http.nio.IOControl;
 
@@ -50,6 +51,7 @@ import org.apache.http.nio.IOControl;
  *
  * @since 4.0
  */
+@ThreadSafe
 public class SharedInputBuffer extends ExpandableBuffer implements ContentInputBuffer {
 
     private final IOControl ioctrl;

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedOutputBuffer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedOutputBuffer.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedOutputBuffer.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedOutputBuffer.java Mon Jul  4 15:26:11 2011
@@ -31,6 +31,7 @@ import java.io.InterruptedIOException;
 import java.util.concurrent.locks.Condition;
 import java.util.concurrent.locks.ReentrantLock;
 
+import org.apache.http.annotation.ThreadSafe;
 import org.apache.http.nio.ContentEncoder;
 import org.apache.http.nio.IOControl;
 
@@ -50,6 +51,7 @@ import org.apache.http.nio.IOControl;
  *
  * @since 4.0
  */
+@ThreadSafe
 public class SharedOutputBuffer extends ExpandableBuffer implements ContentOutputBuffer {
 
     private final IOControl ioctrl;

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/util/SimpleInputBuffer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/util/SimpleInputBuffer.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/util/SimpleInputBuffer.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/util/SimpleInputBuffer.java Mon Jul  4 15:26:11 2011
@@ -28,6 +28,7 @@ package org.apache.http.nio.util;
 
 import java.io.IOException;
 
+import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.nio.ContentDecoder;
 
 /**
@@ -37,6 +38,7 @@ import org.apache.http.nio.ContentDecode
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class SimpleInputBuffer extends ExpandableBuffer implements ContentInputBuffer {
 
     private boolean endOfStream = false;

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/util/SimpleOutputBuffer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/util/SimpleOutputBuffer.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/util/SimpleOutputBuffer.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/util/SimpleOutputBuffer.java Mon Jul  4 15:26:11 2011
@@ -28,6 +28,7 @@ package org.apache.http.nio.util;
 
 import java.io.IOException;
 
+import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.nio.ContentEncoder;
 
 /**
@@ -37,6 +38,7 @@ import org.apache.http.nio.ContentEncode
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class SimpleOutputBuffer extends ExpandableBuffer implements ContentOutputBuffer {
 
     private boolean endOfStream;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HttpHost.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HttpHost.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HttpHost.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HttpHost.java Mon Jul  4 15:26:11 2011
@@ -30,6 +30,7 @@ package org.apache.http;
 import java.io.Serializable;
 import java.util.Locale;
 
+import org.apache.http.annotation.Immutable;
 import org.apache.http.util.LangUtils;
 
 /**
@@ -39,7 +40,7 @@ import org.apache.http.util.LangUtils;
  *
  * @since 4.0
  */
-//@Immutable
+@Immutable
 public final class HttpHost implements Cloneable, Serializable {
 
     private static final long serialVersionUID = -7529410654042457626L;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HttpVersion.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HttpVersion.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HttpVersion.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HttpVersion.java Mon Jul  4 15:26:11 2011
@@ -29,6 +29,8 @@ package org.apache.http;
 
 import java.io.Serializable;
 
+import org.apache.http.annotation.Immutable;
+
 /**
  * Represents an HTTP version. HTTP uses a "major.minor" numbering
  * scheme to indicate versions of the protocol.
@@ -42,6 +44,7 @@ import java.io.Serializable;
  *
  * @since 4.0
  */
+@Immutable
 public final class HttpVersion extends ProtocolVersion
     implements Serializable {
 

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/ProtocolVersion.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/ProtocolVersion.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/ProtocolVersion.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/ProtocolVersion.java Mon Jul  4 15:26:11 2011
@@ -29,6 +29,8 @@ package org.apache.http;
 
 import java.io.Serializable;
 
+import org.apache.http.annotation.Immutable;
+
 /**
  * Represents a protocol version. The "major.minor" numbering
  * scheme is used to indicate versions of the protocol.
@@ -41,6 +43,7 @@ import java.io.Serializable;
  *
  * @since 4.0
  */
+@Immutable
 public class ProtocolVersion implements Serializable, Cloneable {
 
     private static final long serialVersionUID = 8950662842175091068L;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/AbstractHttpEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/AbstractHttpEntity.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/AbstractHttpEntity.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/AbstractHttpEntity.java Mon Jul  4 15:26:11 2011
@@ -32,6 +32,7 @@ import java.io.OutputStream;
 
 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,6 +43,7 @@ import org.apache.http.protocol.HTTP;
  *
  * @since 4.0
  */
+@NotThreadSafe
 public abstract class AbstractHttpEntity implements HttpEntity {
 
     protected Header contentType;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/BasicHttpEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/BasicHttpEntity.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/BasicHttpEntity.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/BasicHttpEntity.java Mon Jul  4 15:26:11 2011
@@ -31,12 +31,15 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 
+import org.apache.http.annotation.NotThreadSafe;
+
 /**
  * A generic streamed, non-repeatable entity that obtains its content
  * from an {@link InputStream}.
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class BasicHttpEntity extends AbstractHttpEntity {
 
     private InputStream content;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/BufferedHttpEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/BufferedHttpEntity.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/BufferedHttpEntity.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/BufferedHttpEntity.java Mon Jul  4 15:26:11 2011
@@ -33,6 +33,7 @@ import java.io.InputStream;
 import java.io.OutputStream;
 
 import org.apache.http.HttpEntity;
+import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.util.EntityUtils;
 
 /**
@@ -44,6 +45,7 @@ import org.apache.http.util.EntityUtils;
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class BufferedHttpEntity extends HttpEntityWrapper {
 
     private final byte[] buffer;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/ByteArrayEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/ByteArrayEntity.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/ByteArrayEntity.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/ByteArrayEntity.java Mon Jul  4 15:26:11 2011
@@ -32,11 +32,14 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 
+import org.apache.http.annotation.NotThreadSafe;
+
 /**
  * A self contained, repeatable entity that obtains its content from a byte array.
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class ByteArrayEntity extends AbstractHttpEntity implements Cloneable {
 
     @Deprecated

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/ContentProducer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/ContentProducer.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/ContentProducer.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/ContentProducer.java Mon Jul  4 15:26:11 2011
@@ -37,6 +37,7 @@ import java.io.OutputStream;
  *
  * @since 4.0
  */
+@Deprecated
 public interface ContentProducer {
 
     void writeTo(OutputStream outstream) throws IOException;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/EntityTemplate.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/EntityTemplate.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/EntityTemplate.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/EntityTemplate.java Mon Jul  4 15:26:11 2011
@@ -31,12 +31,17 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 
+import org.apache.http.HttpEntity;
+
 /**
  * Entity that delegates the process of content generation
  * to a {@link ContentProducer}.
  *
  * @since 4.0
+ *
+ * @deprecated use custom {@link HttpEntity}
  */
+@Deprecated
 public class EntityTemplate extends AbstractHttpEntity {
 
     private final ContentProducer contentproducer;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/FileEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/FileEntity.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/FileEntity.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/FileEntity.java Mon Jul  4 15:26:11 2011
@@ -33,11 +33,14 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 
+import org.apache.http.annotation.NotThreadSafe;
+
 /**
  * A self contained, repeatable entity that obtains its content from a file.
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class FileEntity extends AbstractHttpEntity implements Cloneable {
 
     protected final File file;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/HttpEntityWrapper.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/HttpEntityWrapper.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/HttpEntityWrapper.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/HttpEntityWrapper.java Mon Jul  4 15:26:11 2011
@@ -33,6 +33,7 @@ import java.io.OutputStream;
 
 import org.apache.http.Header;
 import org.apache.http.HttpEntity;
+import org.apache.http.annotation.NotThreadSafe;
 
 /**
  * Base class for wrapping entities.
@@ -43,6 +44,7 @@ import org.apache.http.HttpEntity;
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class HttpEntityWrapper implements HttpEntity {
 
     /** The wrapped entity. */

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/InputStreamEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/InputStreamEntity.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/InputStreamEntity.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/InputStreamEntity.java Mon Jul  4 15:26:11 2011
@@ -31,12 +31,15 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 
+import org.apache.http.annotation.NotThreadSafe;
+
 /**
  * A streamed, non-repeatable entity that obtains its content from
  * an {@link InputStream}.
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class InputStreamEntity extends AbstractHttpEntity {
 
     private final static int BUFFER_SIZE = 2048;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/SerializableEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/SerializableEntity.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/SerializableEntity.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/SerializableEntity.java Mon Jul  4 15:26:11 2011
@@ -35,6 +35,8 @@ import java.io.ObjectOutputStream;
 import java.io.OutputStream;
 import java.io.Serializable;
 
+import org.apache.http.annotation.NotThreadSafe;
+
 /**
  * A streamed entity that obtains its content from a {@link Serializable}.
  * The content obtained from the {@link Serializable} instance can
@@ -43,6 +45,7 @@ import java.io.Serializable;
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class SerializableEntity extends AbstractHttpEntity {
 
     private byte[] objSer;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/StringEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/StringEntity.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/StringEntity.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/StringEntity.java Mon Jul  4 15:26:11 2011
@@ -33,6 +33,7 @@ import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.UnsupportedEncodingException;
 
+import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.protocol.HTTP;
 
 /**
@@ -41,6 +42,7 @@ import org.apache.http.protocol.HTTP;
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class StringEntity extends AbstractHttpEntity implements Cloneable {
 
     protected final byte[] content;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/AbstractHttpClientConnection.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/AbstractHttpClientConnection.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/AbstractHttpClientConnection.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/AbstractHttpClientConnection.java Mon Jul  4 15:26:11 2011
@@ -37,6 +37,7 @@ import org.apache.http.HttpException;
 import org.apache.http.HttpRequest;
 import org.apache.http.HttpResponse;
 import org.apache.http.HttpResponseFactory;
+import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.entity.ContentLengthStrategy;
 import org.apache.http.impl.entity.EntityDeserializer;
 import org.apache.http.impl.entity.EntitySerializer;
@@ -68,6 +69,7 @@ import org.apache.http.params.HttpParams
  *
  * @since 4.0
  */
+@NotThreadSafe
 public abstract class AbstractHttpClientConnection implements HttpClientConnection {
 
     private final EntitySerializer entityserializer;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/AbstractHttpServerConnection.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/AbstractHttpServerConnection.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/AbstractHttpServerConnection.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/AbstractHttpServerConnection.java Mon Jul  4 15:26:11 2011
@@ -37,6 +37,7 @@ import org.apache.http.HttpRequest;
 import org.apache.http.HttpRequestFactory;
 import org.apache.http.HttpResponse;
 import org.apache.http.HttpServerConnection;
+import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.entity.ContentLengthStrategy;
 import org.apache.http.impl.entity.EntityDeserializer;
 import org.apache.http.impl.entity.EntitySerializer;
@@ -68,6 +69,7 @@ import org.apache.http.params.HttpParams
  *
  * @since 4.0
  */
+@NotThreadSafe
 public abstract class AbstractHttpServerConnection implements HttpServerConnection {
 
     private final EntitySerializer entityserializer;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/DefaultConnectionReuseStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/DefaultConnectionReuseStrategy.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/DefaultConnectionReuseStrategy.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/DefaultConnectionReuseStrategy.java Mon Jul  4 15:26:11 2011
@@ -37,6 +37,7 @@ import org.apache.http.ProtocolVersion;
 import org.apache.http.protocol.HTTP;
 import org.apache.http.protocol.HttpContext;
 import org.apache.http.TokenIterator;
+import org.apache.http.annotation.Immutable;
 import org.apache.http.message.BasicTokenIterator;
 
 /**
@@ -57,6 +58,7 @@ import org.apache.http.message.BasicToke
  *
  * @since 4.0
  */
+@Immutable
 public class DefaultConnectionReuseStrategy implements ConnectionReuseStrategy {
 
     public DefaultConnectionReuseStrategy() {

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/DefaultHttpClientConnection.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/DefaultHttpClientConnection.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/DefaultHttpClientConnection.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/DefaultHttpClientConnection.java Mon Jul  4 15:26:11 2011
@@ -30,6 +30,7 @@ package org.apache.http.impl;
 import java.io.IOException;
 import java.net.Socket;
 
+import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.params.HttpConnectionParams;
 import org.apache.http.params.HttpParams;
 
@@ -49,6 +50,7 @@ import org.apache.http.params.HttpParams
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class DefaultHttpClientConnection extends SocketHttpClientConnection {
 
     public DefaultHttpClientConnection() {

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/DefaultHttpRequestFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/DefaultHttpRequestFactory.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/DefaultHttpRequestFactory.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/DefaultHttpRequestFactory.java Mon Jul  4 15:26:11 2011
@@ -31,6 +31,7 @@ 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.message.BasicHttpEntityEnclosingRequest;
 import org.apache.http.message.BasicHttpRequest;
 
@@ -39,6 +40,7 @@ import org.apache.http.message.BasicHttp
  *
  * @since 4.0
  */
+@Immutable
 public class DefaultHttpRequestFactory implements HttpRequestFactory {
 
     private static final String[] RFC2616_COMMON_METHODS = {

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/DefaultHttpResponseFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/DefaultHttpResponseFactory.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/DefaultHttpResponseFactory.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/DefaultHttpResponseFactory.java Mon Jul  4 15:26:11 2011
@@ -37,6 +37,7 @@ import org.apache.http.message.BasicHttp
 import org.apache.http.message.BasicStatusLine;
 import org.apache.http.protocol.HttpContext;
 import org.apache.http.ReasonPhraseCatalog;
+import org.apache.http.annotation.Immutable;
 import org.apache.http.impl.EnglishReasonPhraseCatalog;
 
 /**
@@ -44,6 +45,7 @@ import org.apache.http.impl.EnglishReaso
  *
  * @since 4.0
  */
+@Immutable
 public class DefaultHttpResponseFactory implements HttpResponseFactory {
 
     /** The catalog for looking up reason phrases. */

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/DefaultHttpServerConnection.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/DefaultHttpServerConnection.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/DefaultHttpServerConnection.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/DefaultHttpServerConnection.java Mon Jul  4 15:26:11 2011
@@ -30,6 +30,7 @@ package org.apache.http.impl;
 import java.io.IOException;
 import java.net.Socket;
 
+import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.params.HttpConnectionParams;
 import org.apache.http.params.HttpParams;
 
@@ -49,6 +50,7 @@ import org.apache.http.params.HttpParams
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class DefaultHttpServerConnection extends SocketHttpServerConnection {
 
     public DefaultHttpServerConnection() {

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/EnglishReasonPhraseCatalog.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/EnglishReasonPhraseCatalog.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/EnglishReasonPhraseCatalog.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/EnglishReasonPhraseCatalog.java Mon Jul  4 15:26:11 2011
@@ -31,6 +31,7 @@ import java.util.Locale;
 
 import org.apache.http.HttpStatus;
 import org.apache.http.ReasonPhraseCatalog;
+import org.apache.http.annotation.Immutable;
 
 /**
  * English reason phrases for HTTP status codes.
@@ -39,6 +40,7 @@ import org.apache.http.ReasonPhraseCatal
  *
  * @since 4.0
  */
+@Immutable
 public class EnglishReasonPhraseCatalog implements ReasonPhraseCatalog {
 
     // static array with english reason phrases defined below

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/HttpConnectionMetricsImpl.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/HttpConnectionMetricsImpl.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/HttpConnectionMetricsImpl.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/HttpConnectionMetricsImpl.java Mon Jul  4 15:26:11 2011
@@ -31,6 +31,7 @@ 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;
 
 /**
@@ -38,6 +39,7 @@ 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/trunk/httpcore/src/main/java/org/apache/http/impl/NoConnectionReuseStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/NoConnectionReuseStrategy.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/NoConnectionReuseStrategy.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/NoConnectionReuseStrategy.java Mon Jul  4 15:26:11 2011
@@ -29,6 +29,7 @@ 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.protocol.HttpContext;
 
 /**
@@ -36,6 +37,7 @@ import org.apache.http.protocol.HttpCont
  *
  * @since 4.0
  */
+@Immutable
 public class NoConnectionReuseStrategy implements ConnectionReuseStrategy {
 
     // default constructor

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/SocketHttpClientConnection.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/SocketHttpClientConnection.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/SocketHttpClientConnection.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/SocketHttpClientConnection.java Mon Jul  4 15:26:11 2011
@@ -33,6 +33,7 @@ import java.net.Socket;
 import java.net.SocketException;
 
 import org.apache.http.HttpInetConnection;
+import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.impl.io.SocketInputBuffer;
 import org.apache.http.impl.io.SocketOutputBuffer;
 import org.apache.http.io.SessionInputBuffer;
@@ -57,6 +58,7 @@ import org.apache.http.params.HttpParams
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class SocketHttpClientConnection
         extends AbstractHttpClientConnection implements HttpInetConnection {
 

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/SocketHttpServerConnection.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/SocketHttpServerConnection.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/SocketHttpServerConnection.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/SocketHttpServerConnection.java Mon Jul  4 15:26:11 2011
@@ -33,6 +33,7 @@ import java.net.Socket;
 import java.net.SocketException;
 
 import org.apache.http.HttpInetConnection;
+import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.impl.io.SocketInputBuffer;
 import org.apache.http.impl.io.SocketOutputBuffer;
 import org.apache.http.io.SessionInputBuffer;
@@ -56,6 +57,7 @@ import org.apache.http.params.HttpParams
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class SocketHttpServerConnection extends
         AbstractHttpServerConnection implements HttpInetConnection {
 

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/entity/EntityDeserializer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/entity/EntityDeserializer.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/entity/EntityDeserializer.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/entity/EntityDeserializer.java Mon Jul  4 15:26:11 2011
@@ -33,6 +33,7 @@ import org.apache.http.Header;
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpException;
 import org.apache.http.HttpMessage;
+import org.apache.http.annotation.Immutable;
 import org.apache.http.entity.BasicHttpEntity;
 import org.apache.http.entity.ContentLengthStrategy;
 import org.apache.http.impl.io.ChunkedInputStream;
@@ -57,6 +58,7 @@ import org.apache.http.protocol.HTTP;
  *
  * @since 4.0
  */
+@Immutable // assuming injected dependencies are immutable
 public class EntityDeserializer {
 
     private final ContentLengthStrategy lenStrategy;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/entity/EntitySerializer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/entity/EntitySerializer.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/entity/EntitySerializer.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/entity/EntitySerializer.java Mon Jul  4 15:26:11 2011
@@ -33,6 +33,7 @@ import java.io.OutputStream;
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpException;
 import org.apache.http.HttpMessage;
+import org.apache.http.annotation.Immutable;
 import org.apache.http.entity.ContentLengthStrategy;
 import org.apache.http.impl.io.ChunkedOutputStream;
 import org.apache.http.impl.io.ContentLengthOutputStream;
@@ -54,6 +55,7 @@ import org.apache.http.io.SessionOutputB
  *
  * @since 4.0
  */
+@Immutable // assuming injected dependencies are immutable
 public class EntitySerializer {
 
     private final ContentLengthStrategy lenStrategy;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/entity/LaxContentLengthStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/entity/LaxContentLengthStrategy.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/entity/LaxContentLengthStrategy.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/entity/LaxContentLengthStrategy.java Mon Jul  4 15:26:11 2011
@@ -33,6 +33,7 @@ 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.entity.ContentLengthStrategy;
 import org.apache.http.params.HttpParams;
 import org.apache.http.params.CoreProtocolPNames;
@@ -53,6 +54,7 @@ import org.apache.http.protocol.HTTP;
  *
  * @since 4.0
  */
+@Immutable
 public class LaxContentLengthStrategy implements ContentLengthStrategy {
 
     public LaxContentLengthStrategy() {

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/entity/StrictContentLengthStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/entity/StrictContentLengthStrategy.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/entity/StrictContentLengthStrategy.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/entity/StrictContentLengthStrategy.java Mon Jul  4 15:26:11 2011
@@ -32,6 +32,7 @@ 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.entity.ContentLengthStrategy;
 import org.apache.http.protocol.HTTP;
 
@@ -45,6 +46,7 @@ import org.apache.http.protocol.HTTP;
  *
  * @since 4.0
  */
+@Immutable
 public class StrictContentLengthStrategy implements ContentLengthStrategy {
 
     public StrictContentLengthStrategy() {

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageParser.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageParser.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageParser.java Mon Jul  4 15:26:11 2011
@@ -36,6 +36,7 @@ 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.NotThreadSafe;
 import org.apache.http.io.HttpMessageParser;
 import org.apache.http.io.SessionInputBuffer;
 import org.apache.http.message.LineParser;
@@ -57,6 +58,7 @@ import org.apache.http.util.CharArrayBuf
  *
  * @since 4.0
  */
+@NotThreadSafe
 public abstract class AbstractMessageParser<T extends HttpMessage> implements HttpMessageParser<T> {
 
     private static final int HEAD_LINE    = 0;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageWriter.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageWriter.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageWriter.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageWriter.java Mon Jul  4 15:26:11 2011
@@ -33,6 +33,7 @@ import java.util.Iterator;
 import org.apache.http.Header;
 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.LineFormatter;
@@ -46,6 +47,7 @@ import org.apache.http.util.CharArrayBuf
  *
  * @since 4.0
  */
+@NotThreadSafe
 public abstract class AbstractMessageWriter<T extends HttpMessage> implements HttpMessageWriter<T> {
 
     protected final SessionOutputBuffer sessionBuffer;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractSessionInputBuffer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractSessionInputBuffer.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractSessionInputBuffer.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractSessionInputBuffer.java Mon Jul  4 15:26:11 2011
@@ -35,6 +35,7 @@ import java.nio.charset.Charset;
 import java.nio.charset.CharsetDecoder;
 import java.nio.charset.CoderResult;
 
+import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.io.BufferInfo;
 import org.apache.http.io.SessionInputBuffer;
 import org.apache.http.io.HttpTransportMetrics;
@@ -64,6 +65,7 @@ import org.apache.http.util.CharArrayBuf
  * </ul>
  * @since 4.0
  */
+@NotThreadSafe
 public abstract class AbstractSessionInputBuffer implements SessionInputBuffer, BufferInfo {
 
     private static final Charset ASCII = Charset.forName("US-ASCII");

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractSessionOutputBuffer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractSessionOutputBuffer.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractSessionOutputBuffer.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractSessionOutputBuffer.java Mon Jul  4 15:26:11 2011
@@ -35,6 +35,7 @@ import java.nio.charset.Charset;
 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.SessionOutputBuffer;
 import org.apache.http.io.HttpTransportMetrics;
@@ -63,6 +64,7 @@ import org.apache.http.util.CharArrayBuf
  *
  * @since 4.0
  */
+@NotThreadSafe
 public abstract class AbstractSessionOutputBuffer implements SessionOutputBuffer, BufferInfo {
 
     private static final Charset ASCII = Charset.forName("US-ASCII");

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/ChunkedInputStream.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/ChunkedInputStream.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/ChunkedInputStream.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/ChunkedInputStream.java Mon Jul  4 15:26:11 2011
@@ -34,6 +34,7 @@ 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.io.BufferInfo;
 import org.apache.http.io.SessionInputBuffer;
 import org.apache.http.util.CharArrayBuffer;
@@ -54,6 +55,7 @@ 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/trunk/httpcore/src/main/java/org/apache/http/impl/io/ChunkedOutputStream.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/ChunkedOutputStream.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/ChunkedOutputStream.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/ChunkedOutputStream.java Mon Jul  4 15:26:11 2011
@@ -30,6 +30,7 @@ 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;
 
 /**
@@ -44,6 +45,7 @@ import org.apache.http.io.SessionOutputB
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class ChunkedOutputStream extends OutputStream {
 
     // ----------------------------------------------------- Instance Variables

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/ContentLengthInputStream.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/ContentLengthInputStream.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/ContentLengthInputStream.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/ContentLengthInputStream.java Mon Jul  4 15:26:11 2011
@@ -31,6 +31,7 @@ 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;
 
@@ -50,6 +51,7 @@ import org.apache.http.io.SessionInputBu
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class ContentLengthInputStream extends InputStream {
 
     private static final int BUFFER_SIZE = 2048;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/ContentLengthOutputStream.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/ContentLengthOutputStream.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/ContentLengthOutputStream.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/ContentLengthOutputStream.java Mon Jul  4 15:26:11 2011
@@ -30,6 +30,7 @@ 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,6 +46,7 @@ import org.apache.http.io.SessionOutputB
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class ContentLengthOutputStream extends OutputStream {
 
     /**

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpRequestParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpRequestParser.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpRequestParser.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpRequestParser.java Mon Jul  4 15:26:11 2011
@@ -35,6 +35,7 @@ import org.apache.http.HttpRequest;
 import org.apache.http.HttpRequestFactory;
 import org.apache.http.RequestLine;
 import org.apache.http.ParseException;
+import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.io.SessionInputBuffer;
 import org.apache.http.message.LineParser;
 import org.apache.http.message.ParserCursor;
@@ -54,6 +55,7 @@ import org.apache.http.util.CharArrayBuf
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class HttpRequestParser extends AbstractMessageParser<HttpRequest> {
 
     private final HttpRequestFactory requestFactory;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpRequestWriter.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpRequestWriter.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpRequestWriter.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpRequestWriter.java Mon Jul  4 15:26:11 2011
@@ -30,6 +30,7 @@ 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;
 import org.apache.http.params.HttpParams;
@@ -40,6 +41,7 @@ import org.apache.http.params.HttpParams
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class HttpRequestWriter extends AbstractMessageWriter<HttpRequest> {
 
     public HttpRequestWriter(final SessionOutputBuffer buffer,

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpResponseParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpResponseParser.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpResponseParser.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpResponseParser.java Mon Jul  4 15:26:11 2011
@@ -35,6 +35,7 @@ import org.apache.http.HttpResponseFacto
 import org.apache.http.NoHttpResponseException;
 import org.apache.http.StatusLine;
 import org.apache.http.ParseException;
+import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.io.SessionInputBuffer;
 import org.apache.http.message.LineParser;
 import org.apache.http.message.ParserCursor;
@@ -54,6 +55,7 @@ import org.apache.http.util.CharArrayBuf
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class HttpResponseParser extends AbstractMessageParser<HttpResponse> {
 
     private final HttpResponseFactory responseFactory;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpResponseWriter.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpResponseWriter.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpResponseWriter.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpResponseWriter.java Mon Jul  4 15:26:11 2011
@@ -30,6 +30,7 @@ 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;
 import org.apache.http.params.HttpParams;
@@ -40,6 +41,7 @@ import org.apache.http.params.HttpParams
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class HttpResponseWriter extends AbstractMessageWriter<HttpResponse> {
 
     public HttpResponseWriter(final SessionOutputBuffer buffer,

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpTransportMetricsImpl.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpTransportMetricsImpl.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpTransportMetricsImpl.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpTransportMetricsImpl.java Mon Jul  4 15:26:11 2011
@@ -27,6 +27,7 @@
 
 package org.apache.http.impl.io;
 
+import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.io.HttpTransportMetrics;
 
 /**
@@ -34,6 +35,7 @@ import org.apache.http.io.HttpTransportM
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class HttpTransportMetricsImpl implements HttpTransportMetrics {
 
     private long bytesTransferred = 0;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/IdentityInputStream.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/IdentityInputStream.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/IdentityInputStream.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/IdentityInputStream.java Mon Jul  4 15:26:11 2011
@@ -30,6 +30,7 @@ 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;
 
@@ -45,6 +46,7 @@ import org.apache.http.io.SessionInputBu
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class IdentityInputStream extends InputStream {
 
     private final SessionInputBuffer in;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/IdentityOutputStream.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/IdentityOutputStream.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/IdentityOutputStream.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/IdentityOutputStream.java Mon Jul  4 15:26:11 2011
@@ -30,6 +30,7 @@ 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;
 
 /**
@@ -44,6 +45,7 @@ import org.apache.http.io.SessionOutputB
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class IdentityOutputStream extends OutputStream {
 
     /**

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/SocketInputBuffer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/SocketInputBuffer.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/SocketInputBuffer.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/SocketInputBuffer.java Mon Jul  4 15:26:11 2011
@@ -31,6 +31,7 @@ import java.io.IOException;
 import java.net.Socket;
 import java.net.SocketTimeoutException;
 
+import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.io.EofSensor;
 import org.apache.http.io.SessionInputBuffer;
 import org.apache.http.params.HttpParams;
@@ -47,6 +48,7 @@ import org.apache.http.params.HttpParams
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class SocketInputBuffer extends AbstractSessionInputBuffer implements EofSensor {
 
     private final Socket socket;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/SocketOutputBuffer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/SocketOutputBuffer.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/SocketOutputBuffer.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/SocketOutputBuffer.java Mon Jul  4 15:26:11 2011
@@ -30,6 +30,7 @@ package org.apache.http.impl.io;
 import java.io.IOException;
 import java.net.Socket;
 
+import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.io.SessionOutputBuffer;
 import org.apache.http.params.HttpParams;
 
@@ -44,6 +45,7 @@ import org.apache.http.params.HttpParams
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class SocketOutputBuffer extends AbstractSessionOutputBuffer {
 
     /**

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/AbstractHttpMessage.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/AbstractHttpMessage.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/AbstractHttpMessage.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/AbstractHttpMessage.java Mon Jul  4 15:26:11 2011
@@ -32,6 +32,7 @@ import java.util.Iterator;
 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.HttpParams;
 import org.apache.http.params.BasicHttpParams;
 
@@ -40,6 +41,7 @@ import org.apache.http.params.BasicHttpP
  *
  * @since 4.0
  */
+@NotThreadSafe
 public abstract class AbstractHttpMessage implements HttpMessage {
 
     protected HeaderGroup headergroup;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeader.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeader.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeader.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeader.java Mon Jul  4 15:26:11 2011
@@ -32,12 +32,14 @@ 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;
 
 /**
  * Basic implementation of {@link Header}.
  *
  * @since 4.0
  */
+@Immutable
 public class BasicHeader implements Header, Cloneable, Serializable {
 
     private static final long serialVersionUID = -5427236326487562174L;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderElement.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderElement.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderElement.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderElement.java Mon Jul  4 15:26:11 2011
@@ -29,6 +29,7 @@ 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.LangUtils;
 
 /**
@@ -36,6 +37,7 @@ import org.apache.http.util.LangUtils;
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class BasicHeaderElement implements HeaderElement, Cloneable {
 
     private final String name;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderElementIterator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderElementIterator.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderElementIterator.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderElementIterator.java Mon Jul  4 15:26:11 2011
@@ -34,6 +34,7 @@ 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.CharArrayBuffer;
 
 /**
@@ -41,6 +42,7 @@ import org.apache.http.util.CharArrayBuf
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class BasicHeaderElementIterator implements HeaderElementIterator {
 
     private final HeaderIterator headerIt;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderIterator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderIterator.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderIterator.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderIterator.java Mon Jul  4 15:26:11 2011
@@ -31,12 +31,14 @@ import java.util.NoSuchElementException;
 
 import org.apache.http.Header;
 import org.apache.http.HeaderIterator;
+import org.apache.http.annotation.NotThreadSafe;
 
 /**
  * Basic implementation of a {@link HeaderIterator}.
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class BasicHeaderIterator implements HeaderIterator {
 
     /**

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderValueFormatter.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderValueFormatter.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderValueFormatter.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderValueFormatter.java Mon Jul  4 15:26:11 2011
@@ -29,6 +29,7 @@ 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.util.CharArrayBuffer;
 
 /**
@@ -38,6 +39,7 @@ import org.apache.http.util.CharArrayBuf
  *
  * @since 4.0
  */
+@Immutable
 public class BasicHeaderValueFormatter implements HeaderValueFormatter {
 
     /**

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderValueParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderValueParser.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderValueParser.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderValueParser.java Mon Jul  4 15:26:11 2011
@@ -33,6 +33,7 @@ import java.util.ArrayList;
 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.protocol.HTTP;
 import org.apache.http.util.CharArrayBuffer;
 
@@ -43,6 +44,7 @@ import org.apache.http.util.CharArrayBuf
  *
  * @since 4.0
  */
+@Immutable
 public class BasicHeaderValueParser implements HeaderValueParser {
 
     /**

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHttpEntityEnclosingRequest.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHttpEntityEnclosingRequest.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHttpEntityEnclosingRequest.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHttpEntityEnclosingRequest.java Mon Jul  4 15:26:11 2011
@@ -32,6 +32,7 @@ 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;
 
 /**
@@ -39,6 +40,7 @@ import org.apache.http.protocol.HTTP;
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class BasicHttpEntityEnclosingRequest
             extends BasicHttpRequest implements HttpEntityEnclosingRequest {
 

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHttpRequest.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHttpRequest.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHttpRequest.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHttpRequest.java Mon Jul  4 15:26:11 2011
@@ -30,6 +30,7 @@ package org.apache.http.message;
 import org.apache.http.HttpRequest;
 import org.apache.http.ProtocolVersion;
 import org.apache.http.RequestLine;
+import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.params.HttpParams;
 import org.apache.http.params.HttpProtocolParams;
 
@@ -43,6 +44,7 @@ import org.apache.http.params.HttpProtoc
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class BasicHttpRequest extends AbstractHttpMessage implements HttpRequest {
 
     private final String method;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHttpResponse.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHttpResponse.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHttpResponse.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHttpResponse.java Mon Jul  4 15:26:11 2011
@@ -34,12 +34,14 @@ import org.apache.http.HttpResponse;
 import org.apache.http.ProtocolVersion;
 import org.apache.http.StatusLine;
 import org.apache.http.ReasonPhraseCatalog;
+import org.apache.http.annotation.NotThreadSafe;
 
 /**
  * Basic implementation of {@link HttpResponse}.
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class BasicHttpResponse extends AbstractHttpMessage
     implements HttpResponse {
 

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicLineFormatter.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicLineFormatter.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicLineFormatter.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicLineFormatter.java Mon Jul  4 15:26:11 2011
@@ -32,6 +32,7 @@ import org.apache.http.RequestLine;
 import org.apache.http.StatusLine;
 import org.apache.http.Header;
 import org.apache.http.FormattedHeader;
+import org.apache.http.annotation.Immutable;
 import org.apache.http.util.CharArrayBuffer;
 
 /**
@@ -46,6 +47,7 @@ import org.apache.http.util.CharArrayBuf
  *
  * @since 4.0
  */
+@Immutable
 public class BasicLineFormatter implements LineFormatter {
 
     /**

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicLineParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicLineParser.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicLineParser.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicLineParser.java Mon Jul  4 15:26:11 2011
@@ -33,6 +33,7 @@ import org.apache.http.ParseException;
 import org.apache.http.RequestLine;
 import org.apache.http.StatusLine;
 import org.apache.http.Header;
+import org.apache.http.annotation.Immutable;
 import org.apache.http.protocol.HTTP;
 import org.apache.http.util.CharArrayBuffer;
 
@@ -54,6 +55,7 @@ import org.apache.http.util.CharArrayBuf
  *
  * @since 4.0
  */
+@Immutable
 public class BasicLineParser implements LineParser {
 
     /**

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicListHeaderIterator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicListHeaderIterator.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicListHeaderIterator.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicListHeaderIterator.java Mon Jul  4 15:26:11 2011
@@ -32,6 +32,7 @@ import java.util.NoSuchElementException;
 
 import org.apache.http.Header;
 import org.apache.http.HeaderIterator;
+import org.apache.http.annotation.NotThreadSafe;
 
 /**
  * Implementation of a {@link HeaderIterator} based on a {@link List}.
@@ -39,6 +40,7 @@ import org.apache.http.HeaderIterator;
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class BasicListHeaderIterator implements HeaderIterator {
 
     /**

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicNameValuePair.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicNameValuePair.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicNameValuePair.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicNameValuePair.java Mon Jul  4 15:26:11 2011
@@ -30,6 +30,7 @@ package org.apache.http.message;
 import java.io.Serializable;
 
 import org.apache.http.NameValuePair;
+import org.apache.http.annotation.Immutable;
 import org.apache.http.util.LangUtils;
 
 /**
@@ -37,6 +38,7 @@ import org.apache.http.util.LangUtils;
  *
  * @since 4.0
  */
+@Immutable
 public class BasicNameValuePair implements NameValuePair, Cloneable, Serializable {
 
     private static final long serialVersionUID = -6437800749411518984L;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicRequestLine.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicRequestLine.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicRequestLine.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicRequestLine.java Mon Jul  4 15:26:11 2011
@@ -31,12 +31,14 @@ import java.io.Serializable;
 
 import org.apache.http.ProtocolVersion;
 import org.apache.http.RequestLine;
+import org.apache.http.annotation.Immutable;
 
 /**
  * Basic implementation of {@link RequestLine}.
  *
  * @since 4.0
  */
+@Immutable
 public class BasicRequestLine implements RequestLine, Cloneable, Serializable {
 
     private static final long serialVersionUID = 2810581718468737193L;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicStatusLine.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicStatusLine.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicStatusLine.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicStatusLine.java Mon Jul  4 15:26:11 2011
@@ -31,14 +31,14 @@ import java.io.Serializable;
 
 import org.apache.http.ProtocolVersion;
 import org.apache.http.StatusLine;
+import org.apache.http.annotation.Immutable;
 
 /**
  * Basic implementation of {@link StatusLine}
  *
- * @version $Id$
- *
  * @since 4.0
  */
+@Immutable
 public class BasicStatusLine implements StatusLine, Cloneable, Serializable {
 
     private static final long serialVersionUID = -2443303766890459269L;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicTokenIterator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicTokenIterator.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicTokenIterator.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicTokenIterator.java Mon Jul  4 15:26:11 2011
@@ -32,6 +32,7 @@ import java.util.NoSuchElementException;
 import org.apache.http.HeaderIterator;
 import org.apache.http.ParseException;
 import org.apache.http.TokenIterator;
+import org.apache.http.annotation.NotThreadSafe;
 
 /**
  * Basic implementation of a {@link TokenIterator}.
@@ -41,6 +42,7 @@ import org.apache.http.TokenIterator;
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class BasicTokenIterator implements TokenIterator {
 
     /** The HTTP separator characters. Defined in RFC 2616, section 2.2. */

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BufferedHeader.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BufferedHeader.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BufferedHeader.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BufferedHeader.java Mon Jul  4 15:26:11 2011
@@ -32,6 +32,7 @@ import java.io.Serializable;
 import org.apache.http.FormattedHeader;
 import org.apache.http.HeaderElement;
 import org.apache.http.ParseException;
+import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.util.CharArrayBuffer;
 
 /**
@@ -40,6 +41,7 @@ import org.apache.http.util.CharArrayBuf
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class BufferedHeader implements FormattedHeader, Cloneable, Serializable {
 
     private static final long serialVersionUID = -2768352615787625448L;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/HeaderGroup.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/HeaderGroup.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/HeaderGroup.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/HeaderGroup.java Mon Jul  4 15:26:11 2011
@@ -34,6 +34,7 @@ import java.util.Locale;
 
 import org.apache.http.Header;
 import org.apache.http.HeaderIterator;
+import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.util.CharArrayBuffer;
 
 /**
@@ -44,6 +45,7 @@ import org.apache.http.util.CharArrayBuf
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class HeaderGroup implements Cloneable, Serializable {
 
     private static final long serialVersionUID = 2608834160639271617L;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/ParserCursor.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/ParserCursor.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/ParserCursor.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/ParserCursor.java Mon Jul  4 15:26:11 2011
@@ -27,6 +27,8 @@
 
 package org.apache.http.message;
 
+import org.apache.http.annotation.NotThreadSafe;
+
 /**
  * This class represents a context of a parsing operation:
  * <ul>
@@ -36,6 +38,7 @@ package org.apache.http.message;
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class ParserCursor {
 
     private final int lowerBound;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/BasicHttpParams.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/BasicHttpParams.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/BasicHttpParams.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/BasicHttpParams.java Mon Jul  4 15:26:11 2011
@@ -34,6 +34,7 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Set;
 
+import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.params.HttpParams;
 
 /**
@@ -44,6 +45,7 @@ import org.apache.http.params.HttpParams
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class BasicHttpParams extends AbstractHttpParams implements Serializable, Cloneable {
 
     private static final long serialVersionUID = -7086398485908701455L;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/SyncBasicHttpParams.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/SyncBasicHttpParams.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/SyncBasicHttpParams.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/SyncBasicHttpParams.java Mon Jul  4 15:26:11 2011
@@ -26,11 +26,14 @@
 
 package org.apache.http.params;
 
+import org.apache.http.annotation.ThreadSafe;
+
 /**
  * Thread-safe extension of the {@link BasicHttpParams}.
  *
  * @since 4.1
  */
+@ThreadSafe
 public class SyncBasicHttpParams extends BasicHttpParams {
 
     private static final long serialVersionUID = 5387834869062660642L;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/BasicHttpContext.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/BasicHttpContext.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/BasicHttpContext.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/BasicHttpContext.java Mon Jul  4 15:26:11 2011
@@ -30,6 +30,8 @@ package org.apache.http.protocol;
 import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.http.annotation.NotThreadSafe;
+
 /**
  * Default implementation of {@link HttpContext}.
  * <p>
@@ -38,6 +40,7 @@ import java.util.Map;
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class BasicHttpContext implements HttpContext {
 
     private final HttpContext parentContext;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/BasicHttpProcessor.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/BasicHttpProcessor.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/BasicHttpProcessor.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/BasicHttpProcessor.java Mon Jul  4 15:26:11 2011
@@ -37,6 +37,7 @@ import org.apache.http.HttpRequest;
 import org.apache.http.HttpRequestInterceptor;
 import org.apache.http.HttpResponse;
 import org.apache.http.HttpResponseInterceptor;
+import org.apache.http.annotation.NotThreadSafe;
 
 /**
  * Default implementation of {@link HttpProcessor}.
@@ -46,7 +47,7 @@ import org.apache.http.HttpResponseInter
  *
  * @since 4.0
  */
-//@NotThreadSafe // Lists are not synchronized
+@NotThreadSafe
 public final class BasicHttpProcessor implements
     HttpProcessor, HttpRequestInterceptorList, HttpResponseInterceptorList, Cloneable {
 

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/DefaultedHttpContext.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/DefaultedHttpContext.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/DefaultedHttpContext.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/DefaultedHttpContext.java Mon Jul  4 15:26:11 2011
@@ -27,6 +27,8 @@
 
 package org.apache.http.protocol;
 
+import org.apache.http.annotation.NotThreadSafe;
+
 /**
  * {@link HttpContext} implementation that delegates resolution of an attribute
  * to the given default {@link HttpContext} instance if the attribute is not
@@ -35,6 +37,7 @@ package org.apache.http.protocol;
  *
  * @since 4.0
  */
+@NotThreadSafe
 public final class DefaultedHttpContext implements HttpContext {
 
     private final HttpContext local;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/HttpDateGenerator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/HttpDateGenerator.java?rev=1142715&r1=1142714&r2=1142715&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/HttpDateGenerator.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/HttpDateGenerator.java Mon Jul  4 15:26:11 2011
@@ -33,12 +33,15 @@ import java.util.Date;
 import java.util.Locale;
 import java.util.TimeZone;
 
+import org.apache.http.annotation.GuardedBy;
+import org.apache.http.annotation.ThreadSafe;
 
 /**
  * Generates a date in the format required by the HTTP protocol.
  *
  * @since 4.0
  */
+@ThreadSafe
 public class HttpDateGenerator {
 
     /** Date format pattern used to generate the header in RFC 1123 format. */
@@ -48,10 +51,11 @@ 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() {



Mime
View raw message