You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by gg...@apache.org on 2018/08/13 22:47:52 UTC

[1/2] httpcomponents-client git commit: Use camel-case for ivars and param names; don't nest with else clauses unnecessarily; comment intention of empty blocks; use "readLen" name for local var instead of "i" or other cryptic name to hold read length of

Repository: httpcomponents-client
Updated Branches:
  refs/heads/4.5.x b9a286ed9 -> 2232fc144


http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/test/java/org/apache/http/impl/execchain/TestMainClientExec.java
----------------------------------------------------------------------
diff --git a/httpclient/src/test/java/org/apache/http/impl/execchain/TestMainClientExec.java b/httpclient/src/test/java/org/apache/http/impl/execchain/TestMainClientExec.java
index 2261da8..7de9921 100644
--- a/httpclient/src/test/java/org/apache/http/impl/execchain/TestMainClientExec.java
+++ b/httpclient/src/test/java/org/apache/http/impl/execchain/TestMainClientExec.java
@@ -418,14 +418,14 @@ public class TestMainClientExec {
         final HttpClientContext context = new HttpClientContext();
         final HttpRequestWrapper request = HttpRequestWrapper.wrap(new HttpGet("http://bar/test"));
         final HttpResponse response1 = new BasicHttpResponse(HttpVersion.HTTP_1_1, 401, "Huh?");
-        final InputStream instream1 = Mockito.spy(new ByteArrayInputStream(new byte[] {1, 2, 3}));
+        final InputStream inStream1 = Mockito.spy(new ByteArrayInputStream(new byte[] {1, 2, 3}));
         response1.setEntity(EntityBuilder.create()
-                .setStream(instream1)
+                .setStream(inStream1)
                 .build());
         final HttpResponse response2 = new BasicHttpResponse(HttpVersion.HTTP_1_1, 200, "OK");
-        final InputStream instream2 = Mockito.spy(new ByteArrayInputStream(new byte[] {2, 3, 4}));
+        final InputStream inStream2 = Mockito.spy(new ByteArrayInputStream(new byte[] {2, 3, 4}));
         response2.setEntity(EntityBuilder.create()
-                .setStream(instream2)
+                .setStream(inStream2)
                 .build());
 
         Mockito.when(managedConn.isOpen()).thenReturn(Boolean.TRUE);
@@ -445,8 +445,8 @@ public class TestMainClientExec {
         final CloseableHttpResponse finalResponse = mainClientExec.execute(
                 route, request, context, execAware);
         Mockito.verify(requestExecutor, Mockito.times(2)).execute(request, managedConn, context);
-        Mockito.verify(instream1).close();
-        Mockito.verify(instream2, Mockito.never()).close();
+        Mockito.verify(inStream1).close();
+        Mockito.verify(inStream2, Mockito.never()).close();
 
         Assert.assertNotNull(finalResponse);
         Assert.assertEquals(200, finalResponse.getStatusLine().getStatusCode());
@@ -457,14 +457,14 @@ public class TestMainClientExec {
         final HttpRoute route = new HttpRoute(target);
         final HttpRequestWrapper request = HttpRequestWrapper.wrap(new HttpGet("http://bar/test"));
         final HttpResponse response1 = new BasicHttpResponse(HttpVersion.HTTP_1_1, 401, "Huh?");
-        final InputStream instream1 = Mockito.spy(new ByteArrayInputStream(new byte[] {1, 2, 3}));
+        final InputStream inStream1 = Mockito.spy(new ByteArrayInputStream(new byte[] {1, 2, 3}));
         response1.setEntity(EntityBuilder.create()
-                .setStream(instream1)
+                .setStream(inStream1)
                 .build());
         final HttpResponse response2 = new BasicHttpResponse(HttpVersion.HTTP_1_1, 200, "OK");
-        final InputStream instream2 = Mockito.spy(new ByteArrayInputStream(new byte[] {2, 3, 4}));
+        final InputStream inStream2 = Mockito.spy(new ByteArrayInputStream(new byte[] {2, 3, 4}));
         response2.setEntity(EntityBuilder.create()
-                .setStream(instream2)
+                .setStream(inStream2)
                 .build());
 
         final AuthState proxyAuthState = new AuthState();
@@ -492,7 +492,7 @@ public class TestMainClientExec {
                 route, request, context, execAware);
         Mockito.verify(requestExecutor, Mockito.times(2)).execute(request, managedConn, context);
         Mockito.verify(managedConn).close();
-        Mockito.verify(instream2, Mockito.never()).close();
+        Mockito.verify(inStream2, Mockito.never()).close();
 
         Assert.assertNotNull(finalResponse);
         Assert.assertEquals(200, finalResponse.getStatusLine().getStatusCode());
@@ -505,16 +505,16 @@ public class TestMainClientExec {
         final HttpRoute route = new HttpRoute(target);
         final HttpClientContext context = new HttpClientContext();
         final HttpPost post = new HttpPost("http://bar/test");
-        final InputStream instream0 = new ByteArrayInputStream(new byte[] {1, 2, 3});
+        final InputStream inStream0 = new ByteArrayInputStream(new byte[] {1, 2, 3});
         post.setEntity(EntityBuilder.create()
-                .setStream(instream0)
+                .setStream(inStream0)
                 .build());
         final HttpRequestWrapper request = HttpRequestWrapper.wrap(post);
 
         final HttpResponse response1 = new BasicHttpResponse(HttpVersion.HTTP_1_1, 401, "Huh?");
-        final InputStream instream1 = new ByteArrayInputStream(new byte[] {1, 2, 3});
+        final InputStream inStream1 = new ByteArrayInputStream(new byte[] {1, 2, 3});
         response1.setEntity(EntityBuilder.create()
-                .setStream(instream1)
+                .setStream(inStream1)
                 .build());
 
         Mockito.when(managedConn.isOpen()).thenReturn(Boolean.TRUE);
@@ -733,9 +733,9 @@ public class TestMainClientExec {
         final HttpClientContext context = new HttpClientContext();
         final HttpRequestWrapper request = HttpRequestWrapper.wrap(new HttpGet("http://bar/test"));
         final HttpResponse response1 = new BasicHttpResponse(HttpVersion.HTTP_1_1, 401, "Huh?");
-        final InputStream instream1 = Mockito.spy(new ByteArrayInputStream(new byte[] {1, 2, 3}));
+        final InputStream inStream1 = Mockito.spy(new ByteArrayInputStream(new byte[] {1, 2, 3}));
         response1.setEntity(EntityBuilder.create()
-                .setStream(instream1)
+                .setStream(inStream1)
                 .build());
         final HttpResponse response2 = new BasicHttpResponse(HttpVersion.HTTP_1_1, 200, "OK");
 
@@ -756,7 +756,7 @@ public class TestMainClientExec {
 
         Mockito.verify(connManager).connect(managedConn, route, 0, context);
         Mockito.verify(connManager).routeComplete(managedConn, route, context);
-        Mockito.verify(instream1).close();
+        Mockito.verify(inStream1).close();
     }
 
     @Test
@@ -766,9 +766,9 @@ public class TestMainClientExec {
         final HttpClientContext context = new HttpClientContext();
         final HttpRequestWrapper request = HttpRequestWrapper.wrap(new HttpGet("http://bar/test"));
         final HttpResponse response1 = new BasicHttpResponse(HttpVersion.HTTP_1_1, 401, "Huh?");
-        final InputStream instream1 = Mockito.spy(new ByteArrayInputStream(new byte[] {1, 2, 3}));
+        final InputStream inStream1 = Mockito.spy(new ByteArrayInputStream(new byte[] {1, 2, 3}));
         response1.setEntity(EntityBuilder.create()
-                .setStream(instream1)
+                .setStream(inStream1)
                 .build());
         final HttpResponse response2 = new BasicHttpResponse(HttpVersion.HTTP_1_1, 200, "OK");
 
@@ -789,7 +789,7 @@ public class TestMainClientExec {
 
         Mockito.verify(connManager).connect(managedConn, route, 0, context);
         Mockito.verify(connManager).routeComplete(managedConn, route, context);
-        Mockito.verify(instream1, Mockito.never()).close();
+        Mockito.verify(inStream1, Mockito.never()).close();
         Mockito.verify(managedConn).close();
     }
 

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/test/java/org/apache/http/impl/execchain/TestRedirectExec.java
----------------------------------------------------------------------
diff --git a/httpclient/src/test/java/org/apache/http/impl/execchain/TestRedirectExec.java b/httpclient/src/test/java/org/apache/http/impl/execchain/TestRedirectExec.java
index 5621a3f..a5d0591 100644
--- a/httpclient/src/test/java/org/apache/http/impl/execchain/TestRedirectExec.java
+++ b/httpclient/src/test/java/org/apache/http/impl/execchain/TestRedirectExec.java
@@ -96,15 +96,15 @@ public class TestRedirectExec {
         final HttpClientContext context = HttpClientContext.create();
 
         final CloseableHttpResponse response1 = Mockito.mock(CloseableHttpResponse.class);
-        final InputStream instream1 = Mockito.spy(new ByteArrayInputStream(new byte[] {1, 2, 3}));
+        final InputStream inStream1 = Mockito.spy(new ByteArrayInputStream(new byte[] {1, 2, 3}));
         final HttpEntity entity1 = EntityBuilder.create()
-                .setStream(instream1)
+                .setStream(inStream1)
                 .build();
         Mockito.when(response1.getEntity()).thenReturn(entity1);
         final CloseableHttpResponse response2 = Mockito.mock(CloseableHttpResponse.class);
-        final InputStream instream2 = Mockito.spy(new ByteArrayInputStream(new byte[] {1, 2, 3}));
+        final InputStream inStream2 = Mockito.spy(new ByteArrayInputStream(new byte[] {1, 2, 3}));
         final HttpEntity entity2 = EntityBuilder.create()
-                .setStream(instream2)
+                .setStream(inStream2)
                 .build();
         Mockito.when(response2.getEntity()).thenReturn(entity2);
         final HttpGet redirect = new HttpGet("http://localhost:80/redirect");
@@ -154,9 +154,9 @@ public class TestRedirectExec {
         Assert.assertEquals("that", headers[1].getValue());
 
         Mockito.verify(response1, Mockito.times(1)).close();
-        Mockito.verify(instream1, Mockito.times(1)).close();
+        Mockito.verify(inStream1, Mockito.times(1)).close();
         Mockito.verify(response2, Mockito.never()).close();
-        Mockito.verify(instream2, Mockito.never()).close();
+        Mockito.verify(inStream2, Mockito.never()).close();
     }
 
     @Test(expected = RedirectException.class)
@@ -321,9 +321,9 @@ public class TestRedirectExec {
         final HttpClientContext context = HttpClientContext.create();
 
         final CloseableHttpResponse response1 = Mockito.mock(CloseableHttpResponse.class);
-        final InputStream instream1 = Mockito.spy(new ByteArrayInputStream(new byte[] {1, 2, 3}));
+        final InputStream inStream1 = Mockito.spy(new ByteArrayInputStream(new byte[] {1, 2, 3}));
         final HttpEntity entity1 = EntityBuilder.create()
-                .setStream(instream1)
+                .setStream(inStream1)
                 .build();
         Mockito.when(response1.getEntity()).thenReturn(entity1);
         Mockito.when(requestExecutor.execute(
@@ -343,7 +343,7 @@ public class TestRedirectExec {
         try {
             redirectExec.execute(route, request, context, execAware);
         } catch (final Exception ex) {
-            Mockito.verify(instream1).close();
+            Mockito.verify(inStream1).close();
             Mockito.verify(response1).close();
             throw ex;
         }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/test/java/org/apache/http/impl/execchain/TestResponseEntityWrapper.java
----------------------------------------------------------------------
diff --git a/httpclient/src/test/java/org/apache/http/impl/execchain/TestResponseEntityWrapper.java b/httpclient/src/test/java/org/apache/http/impl/execchain/TestResponseEntityWrapper.java
index 803cb94..b4b2b77 100644
--- a/httpclient/src/test/java/org/apache/http/impl/execchain/TestResponseEntityWrapper.java
+++ b/httpclient/src/test/java/org/apache/http/impl/execchain/TestResponseEntityWrapper.java
@@ -41,16 +41,16 @@ import org.mockito.Mockito;
 @SuppressWarnings("boxing") // test code
 public class TestResponseEntityWrapper {
 
-    private InputStream instream;
+    private InputStream inStream;
     private HttpEntity entity;
     private ConnectionHolder connHolder;
     private ResponseEntityProxy wrapper;
 
     @Before
     public void setup() throws Exception {
-        instream = Mockito.mock(InputStream.class);
+        inStream = Mockito.mock(InputStream.class);
         entity = Mockito.mock(HttpEntity.class);
-        Mockito.when(entity.getContent()).thenReturn(instream);
+        Mockito.when(entity.getContent()).thenReturn(inStream);
         connHolder = Mockito.mock(ConnectionHolder.class);
         wrapper = new ResponseEntityProxy(entity, connHolder);
     }
@@ -61,7 +61,7 @@ public class TestResponseEntityWrapper {
         Mockito.when(connHolder.isReusable()).thenReturn(true);
         EntityUtils.consume(wrapper);
 
-        Mockito.verify(instream, Mockito.times(1)).close();
+        Mockito.verify(inStream, Mockito.times(1)).close();
         Mockito.verify(connHolder).releaseConnection();
     }
 
@@ -69,7 +69,7 @@ public class TestResponseEntityWrapper {
     public void testReusableEntityStreamClosedIOError() throws Exception {
         Mockito.when(entity.isStreaming()).thenReturn(true);
         Mockito.when(connHolder.isReusable()).thenReturn(true);
-        Mockito.doThrow(new IOException()).when(instream).close();
+        Mockito.doThrow(new IOException()).when(inStream).close();
         try {
             EntityUtils.consume(wrapper);
             Assert.fail("IOException expected");
@@ -83,28 +83,28 @@ public class TestResponseEntityWrapper {
         Mockito.when(entity.isStreaming()).thenReturn(true);
         Mockito.when(connHolder.isReusable()).thenReturn(true);
         Mockito.when(connHolder.isReleased()).thenReturn(true);
-        Mockito.doThrow(new SocketException()).when(instream).close();
+        Mockito.doThrow(new SocketException()).when(inStream).close();
         EntityUtils.consume(wrapper);
         Mockito.verify(connHolder).close();
     }
 
     @Test
     public void testReusableEntityWriteTo() throws Exception {
-        final OutputStream outstream = Mockito.mock(OutputStream.class);
+        final OutputStream outStream = Mockito.mock(OutputStream.class);
         Mockito.when(entity.isStreaming()).thenReturn(true);
         Mockito.when(connHolder.isReusable()).thenReturn(true);
-        wrapper.writeTo(outstream);
+        wrapper.writeTo(outStream);
         Mockito.verify(connHolder).releaseConnection();
     }
 
     @Test
     public void testReusableEntityWriteToIOError() throws Exception {
-        final OutputStream outstream = Mockito.mock(OutputStream.class);
+        final OutputStream outStream = Mockito.mock(OutputStream.class);
         Mockito.when(entity.isStreaming()).thenReturn(true);
         Mockito.when(connHolder.isReusable()).thenReturn(true);
-        Mockito.doThrow(new IOException()).when(entity).writeTo(outstream);
+        Mockito.doThrow(new IOException()).when(entity).writeTo(outStream);
         try {
-            wrapper.writeTo(outstream);
+            wrapper.writeTo(outStream);
             Assert.fail("IOException expected");
         } catch (final IOException ex) {
         }
@@ -114,21 +114,21 @@ public class TestResponseEntityWrapper {
 
     @Test
     public void testReusableEntityEndOfStream() throws Exception {
-        Mockito.when(instream.read()).thenReturn(-1);
+        Mockito.when(inStream.read()).thenReturn(-1);
         Mockito.when(entity.isStreaming()).thenReturn(true);
         Mockito.when(connHolder.isReusable()).thenReturn(true);
         final InputStream content = wrapper.getContent();
         Assert.assertEquals(-1, content.read());
-        Mockito.verify(instream).close();
+        Mockito.verify(inStream).close();
         Mockito.verify(connHolder).releaseConnection();
     }
 
     @Test
     public void testReusableEntityEndOfStreamIOError() throws Exception {
-        Mockito.when(instream.read()).thenReturn(-1);
+        Mockito.when(inStream.read()).thenReturn(-1);
         Mockito.when(entity.isStreaming()).thenReturn(true);
         Mockito.when(connHolder.isReusable()).thenReturn(true);
-        Mockito.doThrow(new IOException()).when(instream).close();
+        Mockito.doThrow(new IOException()).when(inStream).close();
         final InputStream content = wrapper.getContent();
         try {
             content.read();

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpmime/src/main/java-deprecated/org/apache/http/entity/mime/MultipartEntity.java
----------------------------------------------------------------------
diff --git a/httpmime/src/main/java-deprecated/org/apache/http/entity/mime/MultipartEntity.java b/httpmime/src/main/java-deprecated/org/apache/http/entity/mime/MultipartEntity.java
index 071aa87..dd264ea 100644
--- a/httpmime/src/main/java-deprecated/org/apache/http/entity/mime/MultipartEntity.java
+++ b/httpmime/src/main/java-deprecated/org/apache/http/entity/mime/MultipartEntity.java
@@ -176,8 +176,8 @@ public class MultipartEntity implements HttpEntity {
     }
 
     @Override
-    public void writeTo(final OutputStream outstream) throws IOException {
-        getEntity().writeTo(outstream);
+    public void writeTo(final OutputStream outStream) throws IOException {
+        getEntity().writeTo(outStream);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpmime/src/main/java/org/apache/http/entity/mime/MultipartFormEntity.java
----------------------------------------------------------------------
diff --git a/httpmime/src/main/java/org/apache/http/entity/mime/MultipartFormEntity.java b/httpmime/src/main/java/org/apache/http/entity/mime/MultipartFormEntity.java
index cabb824..e3afe40 100644
--- a/httpmime/src/main/java/org/apache/http/entity/mime/MultipartFormEntity.java
+++ b/httpmime/src/main/java/org/apache/http/entity/mime/MultipartFormEntity.java
@@ -102,15 +102,15 @@ class MultipartFormEntity implements HttpEntity {
         } else if (this.contentLength > 25 * 1024) {
             throw new ContentTooLongException("Content length is too long: " + this.contentLength);
         }
-        final ByteArrayOutputStream outstream = new ByteArrayOutputStream();
-        writeTo(outstream);
-        outstream.flush();
-        return new ByteArrayInputStream(outstream.toByteArray());
+        final ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+        writeTo(outStream);
+        outStream.flush();
+        return new ByteArrayInputStream(outStream.toByteArray());
     }
 
     @Override
-    public void writeTo(final OutputStream outstream) throws IOException {
-        this.multipart.writeTo(outstream);
+    public void writeTo(final OutputStream outStream) throws IOException {
+        this.multipart.writeTo(outStream);
     }
 
 }


[2/2] httpcomponents-client git commit: Use camel-case for ivars and param names; don't nest with else clauses unnecessarily; comment intention of empty blocks; use "readLen" name for local var instead of "i" or other cryptic name to hold read length of

Posted by gg...@apache.org.
Use camel-case for ivars and param names; don't nest with else clauses
unnecessarily; comment intention of empty blocks; use "readLen" name for
local var instead of "i" or other cryptic name to hold read length of a
read() API call.

Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/commit/2232fc14
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/tree/2232fc14
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/diff/2232fc14

Branch: refs/heads/4.5.x
Commit: 2232fc144c6667cb62e84b76b6000ef6342f511b
Parents: b9a286e
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Aug 13 16:47:47 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Aug 13 16:47:47 2018 -0600

----------------------------------------------------------------------
 .../client/fluent/InternalByteArrayEntity.java  |  8 ++--
 .../http/client/fluent/InternalFileEntity.java  | 14 +++---
 .../fluent/InternalInputStreamEntity.java       | 26 +++++------
 .../org/apache/http/client/fluent/Request.java  |  8 ++--
 .../http/client/cache/ResourceFactory.java      |  4 +-
 .../http/impl/client/cache/CacheEntity.java     | 10 ++---
 .../http/impl/client/cache/CombinedEntity.java  | 16 +++----
 .../impl/client/cache/FileResourceFactory.java  | 10 ++---
 .../impl/client/cache/HeapResourceFactory.java  | 16 +++----
 .../apache/http/impl/client/cache/IOUtils.java  |  6 +--
 .../client/cache/SizeLimitedResponseReader.java | 10 ++---
 .../impl/client/cache/TestCombinedEntity.java   |  4 +-
 .../client/ClientConnectionRelease.java         |  6 +--
 .../apache/http/conn/BasicManagedEntity.java    |  4 +-
 .../http/impl/conn/DefaultClientConnection.java | 16 +++----
 .../impl/conn/LoggingSessionInputBuffer.java    | 34 +++++++--------
 .../http/client/entity/DecompressingEntity.java | 12 ++---
 .../client/entity/GzipCompressingEntity.java    |  6 +--
 .../http/client/entity/InputStreamFactory.java  |  2 +-
 .../http/client/utils/URLEncodedUtils.java      |  8 ++--
 .../apache/http/conn/EofSensorInputStream.java  | 16 +++----
 .../client/EntityEnclosingRequestWrapper.java   |  4 +-
 .../DefaultManagedHttpClientConnection.java     |  8 ++--
 .../LoggingManagedHttpClientConnection.java     |  4 +-
 .../java/org/apache/http/impl/conn/Wire.java    | 16 +++----
 .../http/impl/execchain/RequestEntityProxy.java |  4 +-
 .../impl/execchain/ResponseEntityProxy.java     |  6 +--
 .../org/apache/http/auth/TestCredentials.java   | 24 +++++-----
 .../client/entity/TestDecompressingEntity.java  |  4 +-
 .../client/methods/TestHttpRequestBase.java     |  4 +-
 .../http/client/utils/TestHttpClientUtils.java  | 24 +++++-----
 .../http/conn/TestEofSensorInputStream.java     | 46 ++++++++++----------
 .../client/TestAbstractResponseHandler.java     |  6 +--
 .../http/impl/client/TestBasicCookieStore.java  | 28 ++++++------
 .../impl/client/TestBasicResponseHandler.java   |  6 +--
 .../integration/TestConnectionAutoRelease.java  |  6 +--
 .../TestMalformedServerResponse.java            |  4 +-
 .../http/impl/conn/SessionInputBufferMock.java  | 26 +++++------
 .../conn/TestDefaultHttpResponseParser.java     | 16 +++----
 .../http/impl/cookie/TestBasicClientCookie.java | 12 ++---
 .../impl/cookie/TestBasicClientCookie2.java     | 12 ++---
 .../http/impl/execchain/TestMainClientExec.java | 42 +++++++++---------
 .../http/impl/execchain/TestRedirectExec.java   | 18 ++++----
 .../execchain/TestResponseEntityWrapper.java    | 30 ++++++-------
 .../http/entity/mime/MultipartEntity.java       |  4 +-
 .../http/entity/mime/MultipartFormEntity.java   | 12 ++---
 46 files changed, 301 insertions(+), 301 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/fluent-hc/src/main/java/org/apache/http/client/fluent/InternalByteArrayEntity.java
----------------------------------------------------------------------
diff --git a/fluent-hc/src/main/java/org/apache/http/client/fluent/InternalByteArrayEntity.java b/fluent-hc/src/main/java/org/apache/http/client/fluent/InternalByteArrayEntity.java
index b2702d1..986095f 100644
--- a/fluent-hc/src/main/java/org/apache/http/client/fluent/InternalByteArrayEntity.java
+++ b/fluent-hc/src/main/java/org/apache/http/client/fluent/InternalByteArrayEntity.java
@@ -91,10 +91,10 @@ class InternalByteArrayEntity extends AbstractHttpEntity implements Cloneable {
     }
 
     @Override
-    public void writeTo(final OutputStream outstream) throws IOException {
-        Args.notNull(outstream, "Output stream");
-        outstream.write(this.b, this.off, this.len);
-        outstream.flush();
+    public void writeTo(final OutputStream outStream) throws IOException {
+        Args.notNull(outStream, "Output stream");
+        outStream.write(this.b, this.off, this.len);
+        outStream.flush();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/fluent-hc/src/main/java/org/apache/http/client/fluent/InternalFileEntity.java
----------------------------------------------------------------------
diff --git a/fluent-hc/src/main/java/org/apache/http/client/fluent/InternalFileEntity.java b/fluent-hc/src/main/java/org/apache/http/client/fluent/InternalFileEntity.java
index 39c2b44..6681e5a 100644
--- a/fluent-hc/src/main/java/org/apache/http/client/fluent/InternalFileEntity.java
+++ b/fluent-hc/src/main/java/org/apache/http/client/fluent/InternalFileEntity.java
@@ -65,18 +65,18 @@ class InternalFileEntity extends AbstractHttpEntity implements Cloneable {
     }
 
     @Override
-    public void writeTo(final OutputStream outstream) throws IOException {
-        Args.notNull(outstream, "Output stream");
-        final InputStream instream = new FileInputStream(this.file);
+    public void writeTo(final OutputStream outStream) throws IOException {
+        Args.notNull(outStream, "Output stream");
+        final InputStream inStream = new FileInputStream(this.file);
         try {
             final byte[] tmp = new byte[4096];
             int l;
-            while ((l = instream.read(tmp)) != -1) {
-                outstream.write(tmp, 0, l);
+            while ((l = inStream.read(tmp)) != -1) {
+                outStream.write(tmp, 0, l);
             }
-            outstream.flush();
+            outStream.flush();
         } finally {
-            instream.close();
+            inStream.close();
         }
     }
 

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/fluent-hc/src/main/java/org/apache/http/client/fluent/InternalInputStreamEntity.java
----------------------------------------------------------------------
diff --git a/fluent-hc/src/main/java/org/apache/http/client/fluent/InternalInputStreamEntity.java b/fluent-hc/src/main/java/org/apache/http/client/fluent/InternalInputStreamEntity.java
index 3a47041..701277a 100644
--- a/fluent-hc/src/main/java/org/apache/http/client/fluent/InternalInputStreamEntity.java
+++ b/fluent-hc/src/main/java/org/apache/http/client/fluent/InternalInputStreamEntity.java
@@ -40,9 +40,9 @@ class InternalInputStreamEntity extends AbstractHttpEntity {
     private final InputStream content;
     private final long length;
 
-    public InternalInputStreamEntity(final InputStream instream, final long length, final ContentType contentType) {
+    public InternalInputStreamEntity(final InputStream inputStream, final long length, final ContentType contentType) {
         super();
-        this.content = Args.notNull(instream, "Source input stream");
+        this.content = Args.notNull(inputStream, "Source input stream");
         this.length = length;
         if (contentType != null) {
             setContentType(contentType.toString());
@@ -65,31 +65,31 @@ class InternalInputStreamEntity extends AbstractHttpEntity {
     }
 
     @Override
-    public void writeTo(final OutputStream outstream) throws IOException {
-        Args.notNull(outstream, "Output stream");
-        final InputStream instream = this.content;
+    public void writeTo(final OutputStream outStream) throws IOException {
+        Args.notNull(outStream, "Output stream");
+        final InputStream inStream = this.content;
         try {
             final byte[] buffer = new byte[4096];
-            int l;
+            int readLen;
             if (this.length < 0) {
                 // consume until EOF
-                while ((l = instream.read(buffer)) != -1) {
-                    outstream.write(buffer, 0, l);
+                while ((readLen = inStream.read(buffer)) != -1) {
+                    outStream.write(buffer, 0, readLen);
                 }
             } else {
                 // consume no more than length
                 long remaining = this.length;
                 while (remaining > 0) {
-                    l = instream.read(buffer, 0, (int)Math.min(4096, remaining));
-                    if (l == -1) {
+                    readLen = inStream.read(buffer, 0, (int)Math.min(4096, remaining));
+                    if (readLen == -1) {
                         break;
                     }
-                    outstream.write(buffer, 0, l);
-                    remaining -= l;
+                    outStream.write(buffer, 0, readLen);
+                    remaining -= readLen;
                 }
             }
         } finally {
-            instream.close();
+            inStream.close();
         }
     }
 

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/fluent-hc/src/main/java/org/apache/http/client/fluent/Request.java
----------------------------------------------------------------------
diff --git a/fluent-hc/src/main/java/org/apache/http/client/fluent/Request.java b/fluent-hc/src/main/java/org/apache/http/client/fluent/Request.java
index 4c43f59..4d21166 100644
--- a/fluent-hc/src/main/java/org/apache/http/client/fluent/Request.java
+++ b/fluent-hc/src/main/java/org/apache/http/client/fluent/Request.java
@@ -401,12 +401,12 @@ public class Request {
         return body(new InternalByteArrayEntity(b, off, len, contentType));
     }
 
-    public Request bodyStream(final InputStream instream) {
-        return body(new InternalInputStreamEntity(instream, -1, null));
+    public Request bodyStream(final InputStream inStream) {
+        return body(new InternalInputStreamEntity(inStream, -1, null));
     }
 
-    public Request bodyStream(final InputStream instream, final ContentType contentType) {
-        return body(new InternalInputStreamEntity(instream, -1, contentType));
+    public Request bodyStream(final InputStream inStream, final ContentType contentType) {
+        return body(new InternalInputStreamEntity(inStream, -1, contentType));
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient-cache/src/main/java/org/apache/http/client/cache/ResourceFactory.java
----------------------------------------------------------------------
diff --git a/httpclient-cache/src/main/java/org/apache/http/client/cache/ResourceFactory.java b/httpclient-cache/src/main/java/org/apache/http/client/cache/ResourceFactory.java
index 0966479..96a7225 100644
--- a/httpclient-cache/src/main/java/org/apache/http/client/cache/ResourceFactory.java
+++ b/httpclient-cache/src/main/java/org/apache/http/client/cache/ResourceFactory.java
@@ -41,7 +41,7 @@ public interface ResourceFactory {
      * Creates a {@link Resource} from a given response body.
      * @param requestId a unique identifier for this particular
      *   response body
-     * @param instream the original {@link InputStream}
+     * @param inStream the original {@link InputStream}
      *   containing the response body of the origin HTTP response.
      * @param limit maximum number of bytes to consume of the
      *   response body; if this limit is reached before the
@@ -52,7 +52,7 @@ public interface ResourceFactory {
      *   the response body was successfully read.
      * @throws IOException
      */
-    Resource generate(String requestId, InputStream instream, InputLimit limit) throws IOException;
+    Resource generate(String requestId, InputStream inStream, InputLimit limit) throws IOException;
 
     /**
      * Clones an existing {@link Resource}.

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheEntity.java
----------------------------------------------------------------------
diff --git a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheEntity.java b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheEntity.java
index 529d698..9a9bb04 100644
--- a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheEntity.java
+++ b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheEntity.java
@@ -82,13 +82,13 @@ class CacheEntity implements HttpEntity, Serializable {
     }
 
     @Override
-    public void writeTo(final OutputStream outstream) throws IOException {
-        Args.notNull(outstream, "Output stream");
-        final InputStream instream = this.cacheEntry.getResource().getInputStream();
+    public void writeTo(final OutputStream outStream) throws IOException {
+        Args.notNull(outStream, "Output stream");
+        final InputStream inStream = this.cacheEntry.getResource().getInputStream();
         try {
-            IOUtils.copy(instream, outstream);
+            IOUtils.copy(inStream, outStream);
         } finally {
-            instream.close();
+            inStream.close();
         }
     }
 

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CombinedEntity.java
----------------------------------------------------------------------
diff --git a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CombinedEntity.java b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CombinedEntity.java
index c665339..2a8f5fa 100644
--- a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CombinedEntity.java
+++ b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CombinedEntity.java
@@ -41,11 +41,11 @@ class CombinedEntity extends AbstractHttpEntity {
     private final Resource resource;
     private final InputStream combinedStream;
 
-    CombinedEntity(final Resource resource, final InputStream instream) throws IOException {
+    CombinedEntity(final Resource resource, final InputStream inStream) throws IOException {
         super();
         this.resource = resource;
         this.combinedStream = new SequenceInputStream(
-                new ResourceStream(resource.getInputStream()), instream);
+                new ResourceStream(resource.getInputStream()), inStream);
     }
 
     @Override
@@ -69,17 +69,17 @@ class CombinedEntity extends AbstractHttpEntity {
     }
 
     @Override
-    public void writeTo(final OutputStream outstream) throws IOException {
-        Args.notNull(outstream, "Output stream");
-        final InputStream instream = getContent();
+    public void writeTo(final OutputStream outStream) throws IOException {
+        Args.notNull(outStream, "Output stream");
+        final InputStream inStream = getContent();
         try {
             int l;
             final byte[] tmp = new byte[2048];
-            while ((l = instream.read(tmp)) != -1) {
-                outstream.write(tmp, 0, l);
+            while ((l = inStream.read(tmp)) != -1) {
+                outStream.write(tmp, 0, l);
             }
         } finally {
-            instream.close();
+            inStream.close();
         }
     }
 

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/FileResourceFactory.java
----------------------------------------------------------------------
diff --git a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/FileResourceFactory.java b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/FileResourceFactory.java
index b530eab..b4bdbb6 100644
--- a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/FileResourceFactory.java
+++ b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/FileResourceFactory.java
@@ -73,16 +73,16 @@ public class FileResourceFactory implements ResourceFactory {
     @Override
     public Resource generate(
             final String requestId,
-            final InputStream instream,
+            final InputStream inStream,
             final InputLimit limit) throws IOException {
         final File file = generateUniqueCacheFile(requestId);
-        final FileOutputStream outstream = new FileOutputStream(file);
+        final FileOutputStream outStream = new FileOutputStream(file);
         try {
             final byte[] buf = new byte[2048];
             long total = 0;
             int l;
-            while ((l = instream.read(buf)) != -1) {
-                outstream.write(buf, 0, l);
+            while ((l = inStream.read(buf)) != -1) {
+                outStream.write(buf, 0, l);
                 total += l;
                 if (limit != null && total > limit.getValue()) {
                     limit.reached();
@@ -90,7 +90,7 @@ public class FileResourceFactory implements ResourceFactory {
                 }
             }
         } finally {
-            outstream.close();
+            outStream.close();
         }
         return new FileResource(file);
     }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/HeapResourceFactory.java
----------------------------------------------------------------------
diff --git a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/HeapResourceFactory.java b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/HeapResourceFactory.java
index 8cb9a2d..e00526e 100644
--- a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/HeapResourceFactory.java
+++ b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/HeapResourceFactory.java
@@ -47,21 +47,21 @@ public class HeapResourceFactory implements ResourceFactory {
     @Override
     public Resource generate(
             final String requestId,
-            final InputStream instream,
+            final InputStream inStream,
             final InputLimit limit) throws IOException {
-        final ByteArrayOutputStream outstream = new ByteArrayOutputStream();
+        final ByteArrayOutputStream outStream = new ByteArrayOutputStream();
         final byte[] buf = new byte[2048];
         long total = 0;
         int l;
-        while ((l = instream.read(buf)) != -1) {
-            outstream.write(buf, 0, l);
+        while ((l = inStream.read(buf)) != -1) {
+            outStream.write(buf, 0, l);
             total += l;
             if (limit != null && total > limit.getValue()) {
                 limit.reached();
                 break;
             }
         }
-        return createResource(outstream.toByteArray());
+        return createResource(outStream.toByteArray());
     }
 
     @Override
@@ -72,9 +72,9 @@ public class HeapResourceFactory implements ResourceFactory {
         if (resource instanceof HeapResource) {
             body = ((HeapResource) resource).getByteArray();
         } else {
-            final ByteArrayOutputStream outstream = new ByteArrayOutputStream();
-            IOUtils.copyAndClose(resource.getInputStream(), outstream);
-            body = outstream.toByteArray();
+            final ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+            IOUtils.copyAndClose(resource.getInputStream(), outStream);
+            body = outStream.toByteArray();
         }
         return createResource(body);
     }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/IOUtils.java
----------------------------------------------------------------------
diff --git a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/IOUtils.java b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/IOUtils.java
index 229bce6..f4d6325 100644
--- a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/IOUtils.java
+++ b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/IOUtils.java
@@ -43,9 +43,9 @@ class IOUtils {
             return;
         }
         if (entity.isStreaming()) {
-            final InputStream instream = entity.getContent();
-            if (instream != null) {
-                instream.close();
+            final InputStream inStream = entity.getContent();
+            if (inStream != null) {
+                inStream.close();
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/SizeLimitedResponseReader.java
----------------------------------------------------------------------
diff --git a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/SizeLimitedResponseReader.java b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/SizeLimitedResponseReader.java
index f02e608..d7749ef 100644
--- a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/SizeLimitedResponseReader.java
+++ b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/SizeLimitedResponseReader.java
@@ -49,7 +49,7 @@ class SizeLimitedResponseReader {
     private final HttpRequest request;
     private final CloseableHttpResponse response;
 
-    private InputStream instream;
+    private InputStream inStream;
     private InputLimit limit;
     private Resource resource;
     private boolean consumed;
@@ -99,12 +99,12 @@ class SizeLimitedResponseReader {
             return;
         }
         final String uri = request.getRequestLine().getUri();
-        instream = entity.getContent();
+        inStream = entity.getContent();
         try {
-            resource = resourceFactory.generate(uri, instream, limit);
+            resource = resourceFactory.generate(uri, inStream, limit);
         } finally {
             if (!limit.isReached()) {
-                instream.close();
+                inStream.close();
             }
         }
     }
@@ -124,7 +124,7 @@ class SizeLimitedResponseReader {
         final HttpResponse reconstructed = new BasicHttpResponse(response.getStatusLine());
         reconstructed.setHeaders(response.getAllHeaders());
 
-        final CombinedEntity combinedEntity = new CombinedEntity(resource, instream);
+        final CombinedEntity combinedEntity = new CombinedEntity(resource, inStream);
         final HttpEntity entity = response.getEntity();
         if (entity != null) {
             combinedEntity.setContentType(entity.getContentType());

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestCombinedEntity.java
----------------------------------------------------------------------
diff --git a/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestCombinedEntity.java b/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestCombinedEntity.java
index 2e728bd..b58ab63 100644
--- a/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestCombinedEntity.java
+++ b/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestCombinedEntity.java
@@ -45,8 +45,8 @@ public class TestCombinedEntity {
         when(resource.getInputStream()).thenReturn(
                 new ByteArrayInputStream(new byte[] { 1, 2, 3, 4, 5 }));
 
-        final ByteArrayInputStream instream = new ByteArrayInputStream(new byte[] { 6, 7, 8, 9, 10 });
-        final CombinedEntity entity = new CombinedEntity(resource, instream);
+        final ByteArrayInputStream inStream = new ByteArrayInputStream(new byte[] { 6, 7, 8, 9, 10 });
+        final CombinedEntity entity = new CombinedEntity(resource, inStream);
         Assert.assertEquals(-1, entity.getContentLength());
         Assert.assertFalse(entity.isRepeatable());
         Assert.assertTrue(entity.isStreaming());

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/examples/org/apache/http/examples/client/ClientConnectionRelease.java
----------------------------------------------------------------------
diff --git a/httpclient/src/examples/org/apache/http/examples/client/ClientConnectionRelease.java b/httpclient/src/examples/org/apache/http/examples/client/ClientConnectionRelease.java
index 65ee4bf..39b4c5d 100644
--- a/httpclient/src/examples/org/apache/http/examples/client/ClientConnectionRelease.java
+++ b/httpclient/src/examples/org/apache/http/examples/client/ClientConnectionRelease.java
@@ -59,9 +59,9 @@ public class ClientConnectionRelease {
                 // If the response does not enclose an entity, there is no need
                 // to bother about connection release
                 if (entity != null) {
-                    InputStream instream = entity.getContent();
+                    InputStream inStream = entity.getContent();
                     try {
-                        instream.read();
+                        inStream.read();
                         // do something useful with the response
                     } catch (IOException ex) {
                         // In case of an IOException the connection will be released
@@ -69,7 +69,7 @@ public class ClientConnectionRelease {
                         throw ex;
                     } finally {
                         // Closing the input stream will trigger connection release
-                        instream.close();
+                        inStream.close();
                     }
                 }
             } finally {

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/main/java-deprecated/org/apache/http/conn/BasicManagedEntity.java
----------------------------------------------------------------------
diff --git a/httpclient/src/main/java-deprecated/org/apache/http/conn/BasicManagedEntity.java b/httpclient/src/main/java-deprecated/org/apache/http/conn/BasicManagedEntity.java
index 93765e7..6f5fc89 100644
--- a/httpclient/src/main/java-deprecated/org/apache/http/conn/BasicManagedEntity.java
+++ b/httpclient/src/main/java-deprecated/org/apache/http/conn/BasicManagedEntity.java
@@ -113,8 +113,8 @@ public class BasicManagedEntity extends HttpEntityWrapper
     }
 
     @Override
-    public void writeTo(final OutputStream outstream) throws IOException {
-        super.writeTo(outstream);
+    public void writeTo(final OutputStream outStream) throws IOException {
+        super.writeTo(outStream);
         ensureConsumed();
     }
 

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/main/java-deprecated/org/apache/http/impl/conn/DefaultClientConnection.java
----------------------------------------------------------------------
diff --git a/httpclient/src/main/java-deprecated/org/apache/http/impl/conn/DefaultClientConnection.java b/httpclient/src/main/java-deprecated/org/apache/http/impl/conn/DefaultClientConnection.java
index 081f067..027a1f2 100644
--- a/httpclient/src/main/java-deprecated/org/apache/http/impl/conn/DefaultClientConnection.java
+++ b/httpclient/src/main/java-deprecated/org/apache/http/impl/conn/DefaultClientConnection.java
@@ -187,29 +187,29 @@ public class DefaultClientConnection extends SocketHttpClientConnection
     @Override
     protected SessionInputBuffer createSessionInputBuffer(
             final Socket socket,
-            final int buffersize,
+            final int bufferSize,
             final HttpParams params) throws IOException {
-        SessionInputBuffer inbuffer = super.createSessionInputBuffer(
+        SessionInputBuffer inBuffer = super.createSessionInputBuffer(
                 socket,
-                buffersize > 0 ? buffersize : 8192,
+                bufferSize > 0 ? bufferSize : 8192,
                 params);
         if (wireLog.isDebugEnabled()) {
-            inbuffer = new LoggingSessionInputBuffer(
-                    inbuffer,
+            inBuffer = new LoggingSessionInputBuffer(
+                    inBuffer,
                     new Wire(wireLog),
                     HttpProtocolParams.getHttpElementCharset(params));
         }
-        return inbuffer;
+        return inBuffer;
     }
 
     @Override
     protected SessionOutputBuffer createSessionOutputBuffer(
             final Socket socket,
-            final int buffersize,
+            final int bufferSize,
             final HttpParams params) throws IOException {
         SessionOutputBuffer outbuffer = super.createSessionOutputBuffer(
                 socket,
-                buffersize > 0 ? buffersize : 8192,
+                bufferSize > 0 ? bufferSize : 8192,
                 params);
         if (wireLog.isDebugEnabled()) {
             outbuffer = new LoggingSessionOutputBuffer(

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/main/java-deprecated/org/apache/http/impl/conn/LoggingSessionInputBuffer.java
----------------------------------------------------------------------
diff --git a/httpclient/src/main/java-deprecated/org/apache/http/impl/conn/LoggingSessionInputBuffer.java b/httpclient/src/main/java-deprecated/org/apache/http/impl/conn/LoggingSessionInputBuffer.java
index a0b37ae..6013a29 100644
--- a/httpclient/src/main/java-deprecated/org/apache/http/impl/conn/LoggingSessionInputBuffer.java
+++ b/httpclient/src/main/java-deprecated/org/apache/http/impl/conn/LoggingSessionInputBuffer.java
@@ -83,29 +83,29 @@ public class LoggingSessionInputBuffer implements SessionInputBuffer, EofSensor
 
     @Override
     public int read(final byte[] b, final int off, final int len) throws IOException {
-        final int l = this.in.read(b,  off,  len);
-        if (this.wire.enabled() && l > 0) {
-            this.wire.input(b, off, l);
+        final int readLen = this.in.read(b,  off,  len);
+        if (this.wire.enabled() && readLen > 0) {
+            this.wire.input(b, off, readLen);
         }
-        return l;
+        return readLen;
     }
 
     @Override
     public int read() throws IOException {
-        final int l = this.in.read();
-        if (this.wire.enabled() && l != -1) {
-            this.wire.input(l);
+        final int b = this.in.read();
+        if (this.wire.enabled() && b != -1) {
+            this.wire.input(b);
         }
-        return l;
+        return b;
     }
 
     @Override
     public int read(final byte[] b) throws IOException {
-        final int l = this.in.read(b);
-        if (this.wire.enabled() && l > 0) {
-            this.wire.input(b, 0, l);
+        final int readLen = this.in.read(b);
+        if (this.wire.enabled() && readLen > 0) {
+            this.wire.input(b, 0, readLen);
         }
-        return l;
+        return readLen;
     }
 
     @Override
@@ -120,14 +120,14 @@ public class LoggingSessionInputBuffer implements SessionInputBuffer, EofSensor
 
     @Override
     public int readLine(final CharArrayBuffer buffer) throws IOException {
-        final int l = this.in.readLine(buffer);
-        if (this.wire.enabled() && l >= 0) {
-            final int pos = buffer.length() - l;
-            final String s = new String(buffer.buffer(), pos, l);
+        final int readLen = this.in.readLine(buffer);
+        if (this.wire.enabled() && readLen >= 0) {
+            final int pos = buffer.length() - readLen;
+            final String s = new String(buffer.buffer(), pos, readLen);
             final String tmp = s + "\r\n";
             this.wire.input(tmp.getBytes(this.charset));
         }
-        return l;
+        return readLen;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/main/java/org/apache/http/client/entity/DecompressingEntity.java
----------------------------------------------------------------------
diff --git a/httpclient/src/main/java/org/apache/http/client/entity/DecompressingEntity.java b/httpclient/src/main/java/org/apache/http/client/entity/DecompressingEntity.java
index 08d7c6d..9392f4a 100644
--- a/httpclient/src/main/java/org/apache/http/client/entity/DecompressingEntity.java
+++ b/httpclient/src/main/java/org/apache/http/client/entity/DecompressingEntity.java
@@ -85,17 +85,17 @@ public class DecompressingEntity extends HttpEntityWrapper {
     }
 
     @Override
-    public void writeTo(final OutputStream outstream) throws IOException {
-        Args.notNull(outstream, "Output stream");
-        final InputStream instream = getContent();
+    public void writeTo(final OutputStream outStream) throws IOException {
+        Args.notNull(outStream, "Output stream");
+        final InputStream inStream = getContent();
         try {
             final byte[] buffer = new byte[BUFFER_SIZE];
             int l;
-            while ((l = instream.read(buffer)) != -1) {
-                outstream.write(buffer, 0, l);
+            while ((l = inStream.read(buffer)) != -1) {
+                outStream.write(buffer, 0, l);
             }
         } finally {
-            instream.close();
+            inStream.close();
         }
     }
 

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/main/java/org/apache/http/client/entity/GzipCompressingEntity.java
----------------------------------------------------------------------
diff --git a/httpclient/src/main/java/org/apache/http/client/entity/GzipCompressingEntity.java b/httpclient/src/main/java/org/apache/http/client/entity/GzipCompressingEntity.java
index 3008239..cfa45df 100644
--- a/httpclient/src/main/java/org/apache/http/client/entity/GzipCompressingEntity.java
+++ b/httpclient/src/main/java/org/apache/http/client/entity/GzipCompressingEntity.java
@@ -101,9 +101,9 @@ public class GzipCompressingEntity extends HttpEntityWrapper {
     }
 
     @Override
-    public void writeTo(final OutputStream outstream) throws IOException {
-        Args.notNull(outstream, "Output stream");
-        final GZIPOutputStream gzip = new GZIPOutputStream(outstream);
+    public void writeTo(final OutputStream outStream) throws IOException {
+        Args.notNull(outStream, "Output stream");
+        final GZIPOutputStream gzip = new GZIPOutputStream(outStream);
         wrappedEntity.writeTo(gzip);
         // Only close output stream if the wrapped entity has been
         // successfully written out

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/main/java/org/apache/http/client/entity/InputStreamFactory.java
----------------------------------------------------------------------
diff --git a/httpclient/src/main/java/org/apache/http/client/entity/InputStreamFactory.java b/httpclient/src/main/java/org/apache/http/client/entity/InputStreamFactory.java
index 4753cf6..56d99d6 100644
--- a/httpclient/src/main/java/org/apache/http/client/entity/InputStreamFactory.java
+++ b/httpclient/src/main/java/org/apache/http/client/entity/InputStreamFactory.java
@@ -36,6 +36,6 @@ import java.io.InputStream;
  */
 public interface InputStreamFactory {
 
-    InputStream create(InputStream instream) throws IOException;
+    InputStream create(InputStream inStream) throws IOException;
 
 }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/main/java/org/apache/http/client/utils/URLEncodedUtils.java
----------------------------------------------------------------------
diff --git a/httpclient/src/main/java/org/apache/http/client/utils/URLEncodedUtils.java b/httpclient/src/main/java/org/apache/http/client/utils/URLEncodedUtils.java
index d85cf8d..0397cc4 100644
--- a/httpclient/src/main/java/org/apache/http/client/utils/URLEncodedUtils.java
+++ b/httpclient/src/main/java/org/apache/http/client/utils/URLEncodedUtils.java
@@ -124,14 +124,14 @@ public class URLEncodedUtils {
         final long len = entity.getContentLength();
         Args.check(len <= Integer.MAX_VALUE, "HTTP entity is too large");
         final Charset charset = contentType.getCharset() != null ? contentType.getCharset() : HTTP.DEF_CONTENT_CHARSET;
-        final InputStream instream = entity.getContent();
-        if (instream == null) {
+        final InputStream inStream = entity.getContent();
+        if (inStream == null) {
             return createEmptyList();
         }
         final CharArrayBuffer buf;
         try {
             buf = new CharArrayBuffer(len > 0 ? (int) len : 1024);
-            final Reader reader = new InputStreamReader(instream, charset);
+            final Reader reader = new InputStreamReader(inStream, charset);
             final char[] tmp = new char[1024];
             int l;
             while((l = reader.read(tmp)) != -1) {
@@ -139,7 +139,7 @@ public class URLEncodedUtils {
             }
 
         } finally {
-            instream.close();
+            inStream.close();
         }
         if (buf.isEmpty()) {
             return createEmptyList();

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/main/java/org/apache/http/conn/EofSensorInputStream.java
----------------------------------------------------------------------
diff --git a/httpclient/src/main/java/org/apache/http/conn/EofSensorInputStream.java b/httpclient/src/main/java/org/apache/http/conn/EofSensorInputStream.java
index fb7de2d..774c65b 100644
--- a/httpclient/src/main/java/org/apache/http/conn/EofSensorInputStream.java
+++ b/httpclient/src/main/java/org/apache/http/conn/EofSensorInputStream.java
@@ -111,36 +111,36 @@ public class EofSensorInputStream extends InputStream implements ConnectionRelea
 
     @Override
     public int read() throws IOException {
-        int l = -1;
+        int readLen = -1;
 
         if (isReadAllowed()) {
             try {
-                l = wrappedStream.read();
-                checkEOF(l);
+                readLen = wrappedStream.read();
+                checkEOF(readLen);
             } catch (final IOException ex) {
                 checkAbort();
                 throw ex;
             }
         }
 
-        return l;
+        return readLen;
     }
 
     @Override
     public int read(final byte[] b, final int off, final int len) throws IOException {
-        int l = -1;
+        int readLen = -1;
 
         if (isReadAllowed()) {
             try {
-                l = wrappedStream.read(b,  off,  len);
-                checkEOF(l);
+                readLen = wrappedStream.read(b,  off,  len);
+                checkEOF(readLen);
             } catch (final IOException ex) {
                 checkAbort();
                 throw ex;
             }
         }
 
-        return l;
+        return readLen;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/main/java/org/apache/http/impl/client/EntityEnclosingRequestWrapper.java
----------------------------------------------------------------------
diff --git a/httpclient/src/main/java/org/apache/http/impl/client/EntityEnclosingRequestWrapper.java b/httpclient/src/main/java/org/apache/http/impl/client/EntityEnclosingRequestWrapper.java
index 061ae3f..8b099af 100644
--- a/httpclient/src/main/java/org/apache/http/impl/client/EntityEnclosingRequestWrapper.java
+++ b/httpclient/src/main/java/org/apache/http/impl/client/EntityEnclosingRequestWrapper.java
@@ -105,9 +105,9 @@ public class EntityEnclosingRequestWrapper extends RequestWrapper
         }
 
         @Override
-        public void writeTo(final OutputStream outstream) throws IOException {
+        public void writeTo(final OutputStream outStream) throws IOException {
             consumed = true;
-            super.writeTo(outstream);
+            super.writeTo(outStream);
         }
 
     }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/main/java/org/apache/http/impl/conn/DefaultManagedHttpClientConnection.java
----------------------------------------------------------------------
diff --git a/httpclient/src/main/java/org/apache/http/impl/conn/DefaultManagedHttpClientConnection.java b/httpclient/src/main/java/org/apache/http/impl/conn/DefaultManagedHttpClientConnection.java
index 1a74f5e..97c54e0 100644
--- a/httpclient/src/main/java/org/apache/http/impl/conn/DefaultManagedHttpClientConnection.java
+++ b/httpclient/src/main/java/org/apache/http/impl/conn/DefaultManagedHttpClientConnection.java
@@ -62,7 +62,7 @@ public class DefaultManagedHttpClientConnection extends DefaultBHttpClientConnec
 
     public DefaultManagedHttpClientConnection(
             final String id,
-            final int buffersize,
+            final int bufferSize,
             final int fragmentSizeHint,
             final CharsetDecoder chardecoder,
             final CharsetEncoder charencoder,
@@ -71,7 +71,7 @@ public class DefaultManagedHttpClientConnection extends DefaultBHttpClientConnec
             final ContentLengthStrategy outgoingContentStrategy,
             final HttpMessageWriterFactory<HttpRequest> requestWriterFactory,
             final HttpMessageParserFactory<HttpResponse> responseParserFactory) {
-        super(buffersize, fragmentSizeHint, chardecoder, charencoder,
+        super(bufferSize, fragmentSizeHint, chardecoder, charencoder,
                 constraints, incomingContentStrategy, outgoingContentStrategy,
                 requestWriterFactory, responseParserFactory);
         this.id = id;
@@ -80,8 +80,8 @@ public class DefaultManagedHttpClientConnection extends DefaultBHttpClientConnec
 
     public DefaultManagedHttpClientConnection(
             final String id,
-            final int buffersize) {
-        this(id, buffersize, buffersize, null, null, null, null, null, null, null);
+            final int bufferSize) {
+        this(id, bufferSize, bufferSize, null, null, null, null, null, null, null);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/main/java/org/apache/http/impl/conn/LoggingManagedHttpClientConnection.java
----------------------------------------------------------------------
diff --git a/httpclient/src/main/java/org/apache/http/impl/conn/LoggingManagedHttpClientConnection.java b/httpclient/src/main/java/org/apache/http/impl/conn/LoggingManagedHttpClientConnection.java
index 6d3b34f..6866e42 100644
--- a/httpclient/src/main/java/org/apache/http/impl/conn/LoggingManagedHttpClientConnection.java
+++ b/httpclient/src/main/java/org/apache/http/impl/conn/LoggingManagedHttpClientConnection.java
@@ -54,7 +54,7 @@ class LoggingManagedHttpClientConnection extends DefaultManagedHttpClientConnect
             final Log log,
             final Log headerlog,
             final Log wirelog,
-            final int buffersize,
+            final int bufferSize,
             final int fragmentSizeHint,
             final CharsetDecoder chardecoder,
             final CharsetEncoder charencoder,
@@ -63,7 +63,7 @@ class LoggingManagedHttpClientConnection extends DefaultManagedHttpClientConnect
             final ContentLengthStrategy outgoingContentStrategy,
             final HttpMessageWriterFactory<HttpRequest> requestWriterFactory,
             final HttpMessageParserFactory<HttpResponse> responseParserFactory) {
-        super(id, buffersize, fragmentSizeHint, chardecoder, charencoder,
+        super(id, bufferSize, fragmentSizeHint, chardecoder, charencoder,
                 constraints, incomingContentStrategy, outgoingContentStrategy,
                 requestWriterFactory, responseParserFactory);
         this.log = log;

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/main/java/org/apache/http/impl/conn/Wire.java
----------------------------------------------------------------------
diff --git a/httpclient/src/main/java/org/apache/http/impl/conn/Wire.java b/httpclient/src/main/java/org/apache/http/impl/conn/Wire.java
index 48195e5..07b2e77 100644
--- a/httpclient/src/main/java/org/apache/http/impl/conn/Wire.java
+++ b/httpclient/src/main/java/org/apache/http/impl/conn/Wire.java
@@ -59,11 +59,11 @@ public class Wire {
         this(log, "");
     }
 
-    private void wire(final String header, final InputStream instream)
+    private void wire(final String header, final InputStream inStream)
       throws IOException {
         final StringBuilder buffer = new StringBuilder();
         int ch;
-        while ((ch = instream.read()) != -1) {
+        while ((ch = inStream.read()) != -1) {
             if (ch == 13) {
                 buffer.append("[\\r]");
             } else if (ch == 10) {
@@ -93,16 +93,16 @@ public class Wire {
         return log.isDebugEnabled();
     }
 
-    public void output(final InputStream outstream)
+    public void output(final InputStream outStream)
       throws IOException {
-        Args.notNull(outstream, "Output");
-        wire(">> ", outstream);
+        Args.notNull(outStream, "Output");
+        wire(">> ", outStream);
     }
 
-    public void input(final InputStream instream)
+    public void input(final InputStream inStream)
       throws IOException {
-        Args.notNull(instream, "Input");
-        wire("<< ", instream);
+        Args.notNull(inStream, "Input");
+        wire("<< ", inStream);
     }
 
     public void output(final byte[] b, final int off, final int len)

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/main/java/org/apache/http/impl/execchain/RequestEntityProxy.java
----------------------------------------------------------------------
diff --git a/httpclient/src/main/java/org/apache/http/impl/execchain/RequestEntityProxy.java b/httpclient/src/main/java/org/apache/http/impl/execchain/RequestEntityProxy.java
index 1affd94..e5bba36 100644
--- a/httpclient/src/main/java/org/apache/http/impl/execchain/RequestEntityProxy.java
+++ b/httpclient/src/main/java/org/apache/http/impl/execchain/RequestEntityProxy.java
@@ -116,9 +116,9 @@ class RequestEntityProxy implements HttpEntity  {
     }
 
     @Override
-    public void writeTo(final OutputStream outstream) throws IOException {
+    public void writeTo(final OutputStream outStream) throws IOException {
         consumed = true;
-        original.writeTo(outstream);
+        original.writeTo(outStream);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/main/java/org/apache/http/impl/execchain/ResponseEntityProxy.java
----------------------------------------------------------------------
diff --git a/httpclient/src/main/java/org/apache/http/impl/execchain/ResponseEntityProxy.java b/httpclient/src/main/java/org/apache/http/impl/execchain/ResponseEntityProxy.java
index 6f53c23..47c5ac9 100644
--- a/httpclient/src/main/java/org/apache/http/impl/execchain/ResponseEntityProxy.java
+++ b/httpclient/src/main/java/org/apache/http/impl/execchain/ResponseEntityProxy.java
@@ -94,10 +94,10 @@ class ResponseEntityProxy extends HttpEntityWrapper implements EofSensorWatcher
     }
 
     @Override
-    public void writeTo(final OutputStream outstream) throws IOException {
+    public void writeTo(final OutputStream outStream) throws IOException {
         try {
-            if (outstream != null) {
-                this.wrappedEntity.writeTo(outstream);
+            if (outStream != null) {
+                this.wrappedEntity.writeTo(outStream);
             }
             releaseConnection();
         } catch (final IOException ex) {

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/test/java/org/apache/http/auth/TestCredentials.java
----------------------------------------------------------------------
diff --git a/httpclient/src/test/java/org/apache/http/auth/TestCredentials.java b/httpclient/src/test/java/org/apache/http/auth/TestCredentials.java
index 10564a0..937acc4 100644
--- a/httpclient/src/test/java/org/apache/http/auth/TestCredentials.java
+++ b/httpclient/src/test/java/org/apache/http/auth/TestCredentials.java
@@ -203,13 +203,13 @@ public class TestCredentials {
     public void testUsernamePasswordCredentialsSerialization() throws Exception {
         final UsernamePasswordCredentials orig = new UsernamePasswordCredentials("name", "pwd");
         final ByteArrayOutputStream outbuffer = new ByteArrayOutputStream();
-        final ObjectOutputStream outstream = new ObjectOutputStream(outbuffer);
-        outstream.writeObject(orig);
-        outstream.close();
+        final ObjectOutputStream outStream = new ObjectOutputStream(outbuffer);
+        outStream.writeObject(orig);
+        outStream.close();
         final byte[] raw = outbuffer.toByteArray();
-        final ByteArrayInputStream inbuffer = new ByteArrayInputStream(raw);
-        final ObjectInputStream instream = new ObjectInputStream(inbuffer);
-        final UsernamePasswordCredentials clone = (UsernamePasswordCredentials) instream.readObject();
+        final ByteArrayInputStream inBuffer = new ByteArrayInputStream(raw);
+        final ObjectInputStream inStream = new ObjectInputStream(inBuffer);
+        final UsernamePasswordCredentials clone = (UsernamePasswordCredentials) inStream.readObject();
         Assert.assertEquals(orig, clone);
     }
 
@@ -217,13 +217,13 @@ public class TestCredentials {
     public void testNTCredentialsSerialization() throws Exception {
         final NTCredentials orig = new NTCredentials("name", "pwd", "somehost", "domain");
         final ByteArrayOutputStream outbuffer = new ByteArrayOutputStream();
-        final ObjectOutputStream outstream = new ObjectOutputStream(outbuffer);
-        outstream.writeObject(orig);
-        outstream.close();
+        final ObjectOutputStream outStream = new ObjectOutputStream(outbuffer);
+        outStream.writeObject(orig);
+        outStream.close();
         final byte[] raw = outbuffer.toByteArray();
-        final ByteArrayInputStream inbuffer = new ByteArrayInputStream(raw);
-        final ObjectInputStream instream = new ObjectInputStream(inbuffer);
-        final NTCredentials clone = (NTCredentials) instream.readObject();
+        final ByteArrayInputStream inBuffer = new ByteArrayInputStream(raw);
+        final ObjectInputStream inStream = new ObjectInputStream(inBuffer);
+        final NTCredentials clone = (NTCredentials) inStream.readObject();
         Assert.assertEquals(orig, clone);
     }
 

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/test/java/org/apache/http/client/entity/TestDecompressingEntity.java
----------------------------------------------------------------------
diff --git a/httpclient/src/test/java/org/apache/http/client/entity/TestDecompressingEntity.java b/httpclient/src/test/java/org/apache/http/client/entity/TestDecompressingEntity.java
index 347d99d..b36a609 100644
--- a/httpclient/src/test/java/org/apache/http/client/entity/TestDecompressingEntity.java
+++ b/httpclient/src/test/java/org/apache/http/client/entity/TestDecompressingEntity.java
@@ -97,8 +97,8 @@ public class TestDecompressingEntity {
             super(wrapped, new InputStreamFactory() {
 
                 @Override
-                public InputStream create(final InputStream instream) throws IOException {
-                    return new CheckedInputStream(instream, checksum);
+                public InputStream create(final InputStream inStream) throws IOException {
+                    return new CheckedInputStream(inStream, checksum);
                 }
 
             });

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/test/java/org/apache/http/client/methods/TestHttpRequestBase.java
----------------------------------------------------------------------
diff --git a/httpclient/src/test/java/org/apache/http/client/methods/TestHttpRequestBase.java b/httpclient/src/test/java/org/apache/http/client/methods/TestHttpRequestBase.java
index 51a794e..2165387 100644
--- a/httpclient/src/test/java/org/apache/http/client/methods/TestHttpRequestBase.java
+++ b/httpclient/src/test/java/org/apache/http/client/methods/TestHttpRequestBase.java
@@ -97,8 +97,8 @@ public class TestHttpRequestBase {
 
     @Test(expected=CloneNotSupportedException.class)
     public void testCloneStreamingEntityEnclosingRequests() throws Exception {
-        final ByteArrayInputStream instream = new ByteArrayInputStream(new byte[] {});
-        final InputStreamEntity e2 = new InputStreamEntity(instream, -1);
+        final ByteArrayInputStream inStream = new ByteArrayInputStream(new byte[] {});
+        final InputStreamEntity e2 = new InputStreamEntity(inStream, -1);
         final HttpPost httppost = new HttpPost("http://host/path");
         httppost.setEntity(e2);
         httppost.clone();

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/test/java/org/apache/http/client/utils/TestHttpClientUtils.java
----------------------------------------------------------------------
diff --git a/httpclient/src/test/java/org/apache/http/client/utils/TestHttpClientUtils.java b/httpclient/src/test/java/org/apache/http/client/utils/TestHttpClientUtils.java
index b1fa88d..f8d778f 100644
--- a/httpclient/src/test/java/org/apache/http/client/utils/TestHttpClientUtils.java
+++ b/httpclient/src/test/java/org/apache/http/client/utils/TestHttpClientUtils.java
@@ -66,22 +66,22 @@ public class TestHttpClientUtils {
     public void testCloseQuietlyResponseEntity() throws Exception {
         final HttpResponse response = Mockito.mock(HttpResponse.class);
         final HttpEntity entity = Mockito.mock(HttpEntity.class);
-        final InputStream instream = Mockito.mock(InputStream.class);
+        final InputStream inStream = Mockito.mock(InputStream.class);
         Mockito.when(response.getEntity()).thenReturn(entity);
         Mockito.when(entity.isStreaming()).thenReturn(Boolean.TRUE);
-        Mockito.when(entity.getContent()).thenReturn(instream);
+        Mockito.when(entity.getContent()).thenReturn(inStream);
         HttpClientUtils.closeQuietly(response);
-        Mockito.verify(instream).close();
+        Mockito.verify(inStream).close();
     }
 
     @Test
     public void testCloseQuietlyResponseIgnoreIOError() throws Exception {
         final HttpResponse response = Mockito.mock(HttpResponse.class);
         final HttpEntity entity = Mockito.mock(HttpEntity.class);
-        final InputStream instream = Mockito.mock(InputStream.class);
+        final InputStream inStream = Mockito.mock(InputStream.class);
         Mockito.when(response.getEntity()).thenReturn(entity);
-        Mockito.when(entity.getContent()).thenReturn(instream);
-        Mockito.doThrow(new IOException()).when(instream).close();
+        Mockito.when(entity.getContent()).thenReturn(inStream);
+        Mockito.doThrow(new IOException()).when(inStream).close();
         HttpClientUtils.closeQuietly(response);
     }
 
@@ -114,12 +114,12 @@ public class TestHttpClientUtils {
     public void testCloseQuietlyCloseableResponseEntity() throws Exception {
         final CloseableHttpResponse response = Mockito.mock(CloseableHttpResponse.class);
         final HttpEntity entity = Mockito.mock(HttpEntity.class);
-        final InputStream instream = Mockito.mock(InputStream.class);
+        final InputStream inStream = Mockito.mock(InputStream.class);
         Mockito.when(response.getEntity()).thenReturn(entity);
         Mockito.when(entity.isStreaming()).thenReturn(Boolean.TRUE);
-        Mockito.when(entity.getContent()).thenReturn(instream);
+        Mockito.when(entity.getContent()).thenReturn(inStream);
         HttpClientUtils.closeQuietly(response);
-        Mockito.verify(instream).close();
+        Mockito.verify(inStream).close();
         Mockito.verify(response).close();
     }
 
@@ -127,10 +127,10 @@ public class TestHttpClientUtils {
     public void testCloseQuietlyCloseableResponseIgnoreIOError() throws Exception {
         final CloseableHttpResponse response = Mockito.mock(CloseableHttpResponse.class);
         final HttpEntity entity = Mockito.mock(HttpEntity.class);
-        final InputStream instream = Mockito.mock(InputStream.class);
+        final InputStream inStream = Mockito.mock(InputStream.class);
         Mockito.when(response.getEntity()).thenReturn(entity);
-        Mockito.when(entity.getContent()).thenReturn(instream);
-        Mockito.doThrow(new IOException()).when(instream).close();
+        Mockito.when(entity.getContent()).thenReturn(inStream);
+        Mockito.doThrow(new IOException()).when(inStream).close();
         HttpClientUtils.closeQuietly(response);
     }
 

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/test/java/org/apache/http/conn/TestEofSensorInputStream.java
----------------------------------------------------------------------
diff --git a/httpclient/src/test/java/org/apache/http/conn/TestEofSensorInputStream.java b/httpclient/src/test/java/org/apache/http/conn/TestEofSensorInputStream.java
index 396f431..7770e77 100644
--- a/httpclient/src/test/java/org/apache/http/conn/TestEofSensorInputStream.java
+++ b/httpclient/src/test/java/org/apache/http/conn/TestEofSensorInputStream.java
@@ -37,15 +37,15 @@ import org.mockito.Mockito;
 @SuppressWarnings({"boxing","static-access"}) // test code
 public class TestEofSensorInputStream {
 
-    private InputStream instream;
+    private InputStream inStream;
     private EofSensorWatcher eofwatcher;
     private EofSensorInputStream eofstream;
 
     @Before
     public void setup() throws Exception {
-        instream = Mockito.mock(InputStream.class);
+        inStream = Mockito.mock(InputStream.class);
         eofwatcher = Mockito.mock(EofSensorWatcher.class);
-        eofstream = new EofSensorInputStream(instream, eofwatcher);
+        eofstream = new EofSensorInputStream(inStream, eofwatcher);
     }
 
     @Test
@@ -57,8 +57,8 @@ public class TestEofSensorInputStream {
         Assert.assertTrue(eofstream.isSelfClosed());
         Assert.assertNull(eofstream.getWrappedStream());
 
-        Mockito.verify(instream, Mockito.times(1)).close();
-        Mockito.verify(eofwatcher).streamClosed(instream);
+        Mockito.verify(inStream, Mockito.times(1)).close();
+        Mockito.verify(eofwatcher).streamClosed(inStream);
 
         eofstream.close();
     }
@@ -75,7 +75,7 @@ public class TestEofSensorInputStream {
         Assert.assertTrue(eofstream.isSelfClosed());
         Assert.assertNull(eofstream.getWrappedStream());
 
-        Mockito.verify(eofwatcher).streamClosed(instream);
+        Mockito.verify(eofwatcher).streamClosed(inStream);
     }
 
     @Test
@@ -87,8 +87,8 @@ public class TestEofSensorInputStream {
         Assert.assertTrue(eofstream.isSelfClosed());
         Assert.assertNull(eofstream.getWrappedStream());
 
-        Mockito.verify(instream, Mockito.times(1)).close();
-        Mockito.verify(eofwatcher).streamClosed(instream);
+        Mockito.verify(inStream, Mockito.times(1)).close();
+        Mockito.verify(eofwatcher).streamClosed(inStream);
 
         eofstream.releaseConnection();
     }
@@ -102,8 +102,8 @@ public class TestEofSensorInputStream {
         Assert.assertTrue(eofstream.isSelfClosed());
         Assert.assertNull(eofstream.getWrappedStream());
 
-        Mockito.verify(instream, Mockito.times(1)).close();
-        Mockito.verify(eofwatcher).streamAbort(instream);
+        Mockito.verify(inStream, Mockito.times(1)).close();
+        Mockito.verify(eofwatcher).streamAbort(inStream);
 
         eofstream.abortConnection();
     }
@@ -120,28 +120,28 @@ public class TestEofSensorInputStream {
         Assert.assertTrue(eofstream.isSelfClosed());
         Assert.assertNull(eofstream.getWrappedStream());
 
-        Mockito.verify(eofwatcher).streamAbort(instream);
+        Mockito.verify(eofwatcher).streamAbort(inStream);
     }
 
     @Test
     public void testRead() throws Exception {
         Mockito.when(eofwatcher.eofDetected(Mockito.<InputStream>any())).thenReturn(Boolean.TRUE);
-        Mockito.when(instream.read()).thenReturn(0, -1);
+        Mockito.when(inStream.read()).thenReturn(0, -1);
 
         Assert.assertEquals(0, eofstream.read());
 
         Assert.assertFalse(eofstream.isSelfClosed());
         Assert.assertNotNull(eofstream.getWrappedStream());
 
-        Mockito.verify(eofwatcher, Mockito.never()).eofDetected(instream);
+        Mockito.verify(eofwatcher, Mockito.never()).eofDetected(inStream);
 
         Assert.assertEquals(-1, eofstream.read());
 
         Assert.assertFalse(eofstream.isSelfClosed());
         Assert.assertNull(eofstream.getWrappedStream());
 
-        Mockito.verify(instream, Mockito.times(1)).close();
-        Mockito.verify(eofwatcher).eofDetected(instream);
+        Mockito.verify(inStream, Mockito.times(1)).close();
+        Mockito.verify(eofwatcher).eofDetected(inStream);
 
         Assert.assertEquals(-1, eofstream.read());
     }
@@ -149,7 +149,7 @@ public class TestEofSensorInputStream {
     @Test
     public void testReadIOError() throws Exception {
         Mockito.when(eofwatcher.eofDetected(Mockito.<InputStream>any())).thenReturn(Boolean.TRUE);
-        Mockito.when(instream.read()).thenThrow(new IOException());
+        Mockito.when(inStream.read()).thenThrow(new IOException());
 
         try {
             eofstream.read();
@@ -159,13 +159,13 @@ public class TestEofSensorInputStream {
         Assert.assertFalse(eofstream.isSelfClosed());
         Assert.assertNull(eofstream.getWrappedStream());
 
-        Mockito.verify(eofwatcher).streamAbort(instream);
+        Mockito.verify(eofwatcher).streamAbort(inStream);
     }
 
     @Test
     public void testReadByteArray() throws Exception {
         Mockito.when(eofwatcher.eofDetected(Mockito.<InputStream>any())).thenReturn(Boolean.TRUE);
-        Mockito.when(instream.read(Mockito.<byte []>any(), Mockito.anyInt(), Mockito.anyInt()))
+        Mockito.when(inStream.read(Mockito.<byte []>any(), Mockito.anyInt(), Mockito.anyInt()))
             .thenReturn(1, -1);
 
         final byte[] tmp = new byte[1];
@@ -175,15 +175,15 @@ public class TestEofSensorInputStream {
         Assert.assertFalse(eofstream.isSelfClosed());
         Assert.assertNotNull(eofstream.getWrappedStream());
 
-        Mockito.verify(eofwatcher, Mockito.never()).eofDetected(instream);
+        Mockito.verify(eofwatcher, Mockito.never()).eofDetected(inStream);
 
         Assert.assertEquals(-1, eofstream.read(tmp));
 
         Assert.assertFalse(eofstream.isSelfClosed());
         Assert.assertNull(eofstream.getWrappedStream());
 
-        Mockito.verify(instream, Mockito.times(1)).close();
-        Mockito.verify(eofwatcher).eofDetected(instream);
+        Mockito.verify(inStream, Mockito.times(1)).close();
+        Mockito.verify(eofwatcher).eofDetected(inStream);
 
         Assert.assertEquals(-1, eofstream.read(tmp));
     }
@@ -191,7 +191,7 @@ public class TestEofSensorInputStream {
     @Test
     public void testReadByteArrayIOError() throws Exception {
         Mockito.when(eofwatcher.eofDetected(Mockito.<InputStream>any())).thenReturn(Boolean.TRUE);
-        Mockito.when(instream.read(Mockito.<byte []>any(), Mockito.anyInt(), Mockito.anyInt()))
+        Mockito.when(inStream.read(Mockito.<byte []>any(), Mockito.anyInt(), Mockito.anyInt()))
             .thenThrow(new IOException());
 
         final byte[] tmp = new byte[1];
@@ -203,7 +203,7 @@ public class TestEofSensorInputStream {
         Assert.assertFalse(eofstream.isSelfClosed());
         Assert.assertNull(eofstream.getWrappedStream());
 
-        Mockito.verify(eofwatcher).streamAbort(instream);
+        Mockito.verify(eofwatcher).streamAbort(inStream);
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/test/java/org/apache/http/impl/client/TestAbstractResponseHandler.java
----------------------------------------------------------------------
diff --git a/httpclient/src/test/java/org/apache/http/impl/client/TestAbstractResponseHandler.java b/httpclient/src/test/java/org/apache/http/impl/client/TestAbstractResponseHandler.java
index 6a2930c..cfc2bd6 100644
--- a/httpclient/src/test/java/org/apache/http/impl/client/TestAbstractResponseHandler.java
+++ b/httpclient/src/test/java/org/apache/http/impl/client/TestAbstractResponseHandler.java
@@ -69,10 +69,10 @@ public class TestAbstractResponseHandler {
     @SuppressWarnings("boxing")
     @Test
     public void testUnsuccessfulResponse() throws Exception {
-        final InputStream instream = Mockito.mock(InputStream.class);
+        final InputStream inStream = Mockito.mock(InputStream.class);
         final HttpEntity entity = Mockito.mock(HttpEntity.class);
         Mockito.when(entity.isStreaming()).thenReturn(true);
-        Mockito.when(entity.getContent()).thenReturn(instream);
+        Mockito.when(entity.getContent()).thenReturn(inStream);
         final StatusLine sl = new BasicStatusLine(HttpVersion.HTTP_1_1, 404, "Not Found");
         final HttpResponse response = Mockito.mock(HttpResponse.class);
         Mockito.when(response.getStatusLine()).thenReturn(sl);
@@ -87,7 +87,7 @@ public class TestAbstractResponseHandler {
             Assert.assertEquals("Not Found", ex.getMessage());
         }
         Mockito.verify(entity).getContent();
-        Mockito.verify(instream).close();
+        Mockito.verify(inStream).close();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/test/java/org/apache/http/impl/client/TestBasicCookieStore.java
----------------------------------------------------------------------
diff --git a/httpclient/src/test/java/org/apache/http/impl/client/TestBasicCookieStore.java b/httpclient/src/test/java/org/apache/http/impl/client/TestBasicCookieStore.java
index a329758..6760345 100644
--- a/httpclient/src/test/java/org/apache/http/impl/client/TestBasicCookieStore.java
+++ b/httpclient/src/test/java/org/apache/http/impl/client/TestBasicCookieStore.java
@@ -49,15 +49,15 @@ public class TestBasicCookieStore {
         final BasicCookieStore store = new BasicCookieStore();
         store.addCookie(new BasicClientCookie("name1", "value1"));
         store.addCookies(new BasicClientCookie[] {new BasicClientCookie("name2", "value2")});
-        List<Cookie> l = store.getCookies();
-        Assert.assertNotNull(l);
-        Assert.assertEquals(2, l.size());
-        Assert.assertEquals("name1", l.get(0).getName());
-        Assert.assertEquals("name2", l.get(1).getName());
+        List<Cookie> list = store.getCookies();
+        Assert.assertNotNull(list);
+        Assert.assertEquals(2, list.size());
+        Assert.assertEquals("name1", list.get(0).getName());
+        Assert.assertEquals("name2", list.get(1).getName());
         store.clear();
-        l = store.getCookies();
-        Assert.assertNotNull(l);
-        Assert.assertEquals(0, l.size());
+        list = store.getCookies();
+        Assert.assertNotNull(list);
+        Assert.assertEquals(0, list.size());
     }
 
     @Test
@@ -80,13 +80,13 @@ public class TestBasicCookieStore {
         orig.addCookie(new BasicClientCookie("name1", "value1"));
         orig.addCookie(new BasicClientCookie("name2", "value2"));
         final ByteArrayOutputStream outbuffer = new ByteArrayOutputStream();
-        final ObjectOutputStream outstream = new ObjectOutputStream(outbuffer);
-        outstream.writeObject(orig);
-        outstream.close();
+        final ObjectOutputStream outStream = new ObjectOutputStream(outbuffer);
+        outStream.writeObject(orig);
+        outStream.close();
         final byte[] raw = outbuffer.toByteArray();
-        final ByteArrayInputStream inbuffer = new ByteArrayInputStream(raw);
-        final ObjectInputStream instream = new ObjectInputStream(inbuffer);
-        final BasicCookieStore clone = (BasicCookieStore) instream.readObject();
+        final ByteArrayInputStream inBuffer = new ByteArrayInputStream(raw);
+        final ObjectInputStream inStream = new ObjectInputStream(inBuffer);
+        final BasicCookieStore clone = (BasicCookieStore) inStream.readObject();
         final List<Cookie> expected = orig.getCookies();
         final List<Cookie> clones = clone.getCookies();
         Assert.assertNotNull(expected);

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/test/java/org/apache/http/impl/client/TestBasicResponseHandler.java
----------------------------------------------------------------------
diff --git a/httpclient/src/test/java/org/apache/http/impl/client/TestBasicResponseHandler.java b/httpclient/src/test/java/org/apache/http/impl/client/TestBasicResponseHandler.java
index 8a4f0ed..8bb0a43 100644
--- a/httpclient/src/test/java/org/apache/http/impl/client/TestBasicResponseHandler.java
+++ b/httpclient/src/test/java/org/apache/http/impl/client/TestBasicResponseHandler.java
@@ -61,10 +61,10 @@ public class TestBasicResponseHandler {
 
     @Test
     public void testUnsuccessfulResponse() throws Exception {
-        final InputStream instream = Mockito.mock(InputStream.class);
+        final InputStream inStream = Mockito.mock(InputStream.class);
         final HttpEntity entity = Mockito.mock(HttpEntity.class);
         Mockito.when(entity.isStreaming()).thenReturn(true);
-        Mockito.when(entity.getContent()).thenReturn(instream);
+        Mockito.when(entity.getContent()).thenReturn(inStream);
         final StatusLine sl = new BasicStatusLine(HttpVersion.HTTP_1_1, 404, "Not Found");
         final HttpResponse response = Mockito.mock(HttpResponse.class);
         Mockito.when(response.getStatusLine()).thenReturn(sl);
@@ -79,7 +79,7 @@ public class TestBasicResponseHandler {
             Assert.assertEquals("Not Found", ex.getMessage());
         }
         Mockito.verify(entity).getContent();
-        Mockito.verify(instream).close();
+        Mockito.verify(inStream).close();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/test/java/org/apache/http/impl/client/integration/TestConnectionAutoRelease.java
----------------------------------------------------------------------
diff --git a/httpclient/src/test/java/org/apache/http/impl/client/integration/TestConnectionAutoRelease.java b/httpclient/src/test/java/org/apache/http/impl/client/integration/TestConnectionAutoRelease.java
index a4de80d..63451d4 100644
--- a/httpclient/src/test/java/org/apache/http/impl/client/integration/TestConnectionAutoRelease.java
+++ b/httpclient/src/test/java/org/apache/http/impl/client/integration/TestConnectionAutoRelease.java
@@ -178,10 +178,10 @@ public class TestConnectionAutoRelease extends LocalServerTestBase {
 
                     @Override
                     public void writeTo(
-                            final OutputStream outstream) throws IOException {
+                            final OutputStream outStream) throws IOException {
                         final byte[] tmp = new byte[5];
-                        outstream.write(tmp);
-                        outstream.flush();
+                        outStream.write(tmp);
+                        outStream.flush();
 
                         // do something comletely ugly in order to trigger
                         // MalformedChunkCodingException

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/test/java/org/apache/http/impl/client/integration/TestMalformedServerResponse.java
----------------------------------------------------------------------
diff --git a/httpclient/src/test/java/org/apache/http/impl/client/integration/TestMalformedServerResponse.java b/httpclient/src/test/java/org/apache/http/impl/client/integration/TestMalformedServerResponse.java
index b18f8fc..9dc8f6d 100644
--- a/httpclient/src/test/java/org/apache/http/impl/client/integration/TestMalformedServerResponse.java
+++ b/httpclient/src/test/java/org/apache/http/impl/client/integration/TestMalformedServerResponse.java
@@ -50,8 +50,8 @@ public class TestMalformedServerResponse extends LocalServerTestBase {
 
     static class BrokenServerConnection extends DefaultBHttpServerConnection {
 
-        public BrokenServerConnection(final int buffersize) {
-            super(buffersize);
+        public BrokenServerConnection(final int bufferSize) {
+            super(bufferSize);
         }
 
         @Override

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/test/java/org/apache/http/impl/conn/SessionInputBufferMock.java
----------------------------------------------------------------------
diff --git a/httpclient/src/test/java/org/apache/http/impl/conn/SessionInputBufferMock.java b/httpclient/src/test/java/org/apache/http/impl/conn/SessionInputBufferMock.java
index 15c9f20..f1ca207 100644
--- a/httpclient/src/test/java/org/apache/http/impl/conn/SessionInputBufferMock.java
+++ b/httpclient/src/test/java/org/apache/http/impl/conn/SessionInputBufferMock.java
@@ -45,39 +45,39 @@ public class SessionInputBufferMock extends SessionInputBufferImpl {
     public static final int BUFFER_SIZE = 16;
 
     public SessionInputBufferMock(
-            final InputStream instream,
-            final int buffersize,
+            final InputStream inStream,
+            final int bufferSize,
             final MessageConstraints constrains,
             final CharsetDecoder decoder) {
-        super(new HttpTransportMetricsImpl(), buffersize, -1, constrains, decoder);
-        bind(instream);
+        super(new HttpTransportMetricsImpl(), bufferSize, -1, constrains, decoder);
+        bind(inStream);
     }
 
     public SessionInputBufferMock(
-            final InputStream instream,
-            final int buffersize) {
-        this(instream, buffersize, null, null);
+            final InputStream inStream,
+            final int bufferSize) {
+        this(inStream, bufferSize, null, null);
     }
 
     public SessionInputBufferMock(
             final byte[] bytes,
-            final int buffersize,
+            final int bufferSize,
             final MessageConstraints constrains,
             final CharsetDecoder decoder) {
-        this(new ByteArrayInputStream(bytes), buffersize, constrains, decoder);
+        this(new ByteArrayInputStream(bytes), bufferSize, constrains, decoder);
     }
 
     public SessionInputBufferMock(
             final byte[] bytes,
-            final int buffersize,
+            final int bufferSize,
             final MessageConstraints constrains) {
-        this(new ByteArrayInputStream(bytes), buffersize, constrains, null);
+        this(new ByteArrayInputStream(bytes), bufferSize, constrains, null);
     }
 
     public SessionInputBufferMock(
             final byte[] bytes,
-            final int buffersize) {
-        this(new ByteArrayInputStream(bytes), buffersize);
+            final int bufferSize) {
+        this(new ByteArrayInputStream(bytes), bufferSize);
     }
 
     public SessionInputBufferMock(

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/test/java/org/apache/http/impl/conn/TestDefaultHttpResponseParser.java
----------------------------------------------------------------------
diff --git a/httpclient/src/test/java/org/apache/http/impl/conn/TestDefaultHttpResponseParser.java b/httpclient/src/test/java/org/apache/http/impl/conn/TestDefaultHttpResponseParser.java
index 207cddc..da26ebd 100644
--- a/httpclient/src/test/java/org/apache/http/impl/conn/TestDefaultHttpResponseParser.java
+++ b/httpclient/src/test/java/org/apache/http/impl/conn/TestDefaultHttpResponseParser.java
@@ -55,8 +55,8 @@ public class TestDefaultHttpResponseParser {
             "header2: value2\r\n" +
             "\r\n";
 
-        final SessionInputBuffer inbuffer = new SessionInputBufferMock(s, Consts.ASCII);
-        final HttpMessageParser<HttpResponse> parser = new DefaultHttpResponseParser(inbuffer);
+        final SessionInputBuffer inBuffer = new SessionInputBufferMock(s, Consts.ASCII);
+        final HttpMessageParser<HttpResponse> parser = new DefaultHttpResponseParser(inBuffer);
 
         final HttpResponse response = parser.parse();
         Assert.assertNotNull(response);
@@ -81,8 +81,8 @@ public class TestDefaultHttpResponseParser {
             "header2: value2\r\n" +
             "\r\n";
 
-        final SessionInputBuffer inbuffer = new SessionInputBufferMock(s, Consts.ASCII);
-        final HttpMessageParser<HttpResponse> parser = new DefaultHttpResponseParser(inbuffer) {
+        final SessionInputBuffer inBuffer = new SessionInputBufferMock(s, Consts.ASCII);
+        final HttpMessageParser<HttpResponse> parser = new DefaultHttpResponseParser(inBuffer) {
 
             @Override
             protected boolean reject(final CharArrayBuffer line, final int count) {
@@ -95,8 +95,8 @@ public class TestDefaultHttpResponseParser {
 
     @Test(expected=NoHttpResponseException.class)
     public void testResponseParsingNoResponse() throws Exception {
-        final SessionInputBuffer inbuffer = new SessionInputBufferMock("", Consts.ASCII);
-        final HttpMessageParser<HttpResponse> parser = new DefaultHttpResponseParser(inbuffer);
+        final SessionInputBuffer inBuffer = new SessionInputBufferMock("", Consts.ASCII);
+        final HttpMessageParser<HttpResponse> parser = new DefaultHttpResponseParser(inBuffer);
         parser.parse();
     }
 
@@ -107,8 +107,8 @@ public class TestDefaultHttpResponseParser {
             "garbage\r\n" +
             "more garbage\r\n" +
             "a lot more garbage\r\n";
-        final SessionInputBuffer inbuffer = new SessionInputBufferMock(s, Consts.ASCII);
-        final HttpMessageParser<HttpResponse> parser = new DefaultHttpResponseParser(inbuffer);
+        final SessionInputBuffer inBuffer = new SessionInputBufferMock(s, Consts.ASCII);
+        final HttpMessageParser<HttpResponse> parser = new DefaultHttpResponseParser(inBuffer);
         parser.parse();
     }
 

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/test/java/org/apache/http/impl/cookie/TestBasicClientCookie.java
----------------------------------------------------------------------
diff --git a/httpclient/src/test/java/org/apache/http/impl/cookie/TestBasicClientCookie.java b/httpclient/src/test/java/org/apache/http/impl/cookie/TestBasicClientCookie.java
index c807a2f..d1378b0 100644
--- a/httpclient/src/test/java/org/apache/http/impl/cookie/TestBasicClientCookie.java
+++ b/httpclient/src/test/java/org/apache/http/impl/cookie/TestBasicClientCookie.java
@@ -75,13 +75,13 @@ public class TestBasicClientCookie {
         orig.setPath("/");
         orig.setAttribute("attrib", "stuff");
         final ByteArrayOutputStream outbuffer = new ByteArrayOutputStream();
-        final ObjectOutputStream outstream = new ObjectOutputStream(outbuffer);
-        outstream.writeObject(orig);
-        outstream.close();
+        final ObjectOutputStream outStream = new ObjectOutputStream(outbuffer);
+        outStream.writeObject(orig);
+        outStream.close();
         final byte[] raw = outbuffer.toByteArray();
-        final ByteArrayInputStream inbuffer = new ByteArrayInputStream(raw);
-        final ObjectInputStream instream = new ObjectInputStream(inbuffer);
-        final BasicClientCookie clone = (BasicClientCookie) instream.readObject();
+        final ByteArrayInputStream inBuffer = new ByteArrayInputStream(raw);
+        final ObjectInputStream inStream = new ObjectInputStream(inBuffer);
+        final BasicClientCookie clone = (BasicClientCookie) inStream.readObject();
         Assert.assertEquals(orig.getName(), clone.getName());
         Assert.assertEquals(orig.getValue(), clone.getValue());
         Assert.assertEquals(orig.getDomain(), clone.getDomain());

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/2232fc14/httpclient/src/test/java/org/apache/http/impl/cookie/TestBasicClientCookie2.java
----------------------------------------------------------------------
diff --git a/httpclient/src/test/java/org/apache/http/impl/cookie/TestBasicClientCookie2.java b/httpclient/src/test/java/org/apache/http/impl/cookie/TestBasicClientCookie2.java
index 9af1608..31fad7d 100644
--- a/httpclient/src/test/java/org/apache/http/impl/cookie/TestBasicClientCookie2.java
+++ b/httpclient/src/test/java/org/apache/http/impl/cookie/TestBasicClientCookie2.java
@@ -95,13 +95,13 @@ public class TestBasicClientCookie2 {
         orig.setAttribute("attrib", "stuff");
         orig.setPorts(new int[] {80, 8080});
         final ByteArrayOutputStream outbuffer = new ByteArrayOutputStream();
-        final ObjectOutputStream outstream = new ObjectOutputStream(outbuffer);
-        outstream.writeObject(orig);
-        outstream.close();
+        final ObjectOutputStream outStream = new ObjectOutputStream(outbuffer);
+        outStream.writeObject(orig);
+        outStream.close();
         final byte[] raw = outbuffer.toByteArray();
-        final ByteArrayInputStream inbuffer = new ByteArrayInputStream(raw);
-        final ObjectInputStream instream = new ObjectInputStream(inbuffer);
-        final BasicClientCookie2 clone = (BasicClientCookie2) instream.readObject();
+        final ByteArrayInputStream inBuffer = new ByteArrayInputStream(raw);
+        final ObjectInputStream inStream = new ObjectInputStream(inBuffer);
+        final BasicClientCookie2 clone = (BasicClientCookie2) inStream.readObject();
         Assert.assertEquals(orig.getName(), clone.getName());
         Assert.assertEquals(orig.getValue(), clone.getValue());
         Assert.assertEquals(orig.getDomain(), clone.getDomain());