hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1558069 - in /httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache: HttpTestUtils.java TestProtocolDeviations.java TestProtocolRequirements.java TestResponseCachingPolicy.java
Date Tue, 14 Jan 2014 15:07:14 GMT
Author: ggregory
Date: Tue Jan 14 15:07:14 2014
New Revision: 1558069

URL: http://svn.apache.org/r1558069
Log:
Remove useless parens.

Modified:
    httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/HttpTestUtils.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestProtocolDeviations.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestProtocolRequirements.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestResponseCachingPolicy.java

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/HttpTestUtils.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/HttpTestUtils.java?rev=1558069&r1=1558068&r2=1558069&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/HttpTestUtils.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/HttpTestUtils.java
Tue Jan 14 15:07:14 2014
@@ -252,7 +252,7 @@ public class HttpTestUtils {
 
     public static byte[] getRandomBytes(final int nbytes) {
         final byte[] bytes = new byte[nbytes];
-        (new Random()).nextBytes(bytes);
+        new Random().nextBytes(bytes);
         return bytes;
     }
 

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestProtocolDeviations.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestProtocolDeviations.java?rev=1558069&r1=1558068&r2=1558069&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestProtocolDeviations.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestProtocolDeviations.java
Tue Jan 14 15:07:14 2014
@@ -145,7 +145,7 @@ public class TestProtocolDeviations {
 
     private HttpEntity makeBody(final int nbytes) {
         final byte[] bytes = new byte[nbytes];
-        (new Random()).nextBytes(bytes);
+        new Random().nextBytes(bytes);
         return new ByteArrayEntity(bytes);
     }
 
@@ -218,7 +218,7 @@ public class TestProtocolDeviations {
                 HTTP_1_1);
 
         final byte[] bytes = new byte[128];
-        (new Random()).nextBytes(bytes);
+        new Random().nextBytes(bytes);
 
         final HttpEntity mockBody = EasyMock.createMockBuilder(ByteArrayEntity.class).withConstructor(
                 new Object[] { bytes }).addMockedMethods("getContentLength").createNiceMock();

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestProtocolRequirements.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestProtocolRequirements.java?rev=1558069&r1=1558068&r2=1558069&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestProtocolRequirements.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestProtocolRequirements.java
Tue Jan 14 15:07:14 2014
@@ -1782,7 +1782,7 @@ public class TestProtocolRequirements ex
             originResponse.setHeader("Content-Range", "bytes 0-50/128");
             originResponse.setHeader("Cache-Control", "max-age=3600");
             final byte[] bytes = new byte[51];
-            (new Random()).nextBytes(bytes);
+            new Random().nextBytes(bytes);
             originResponse.setEntity(new ByteArrayEntity(bytes));
 
             EasyMock.expect(
@@ -2486,7 +2486,7 @@ public class TestProtocolRequirements ex
         };
 
         final byte[] bytes = new byte[128];
-        (new Random()).nextBytes(bytes);
+        new Random().nextBytes(bytes);
 
         final HttpCacheEntry entry = HttpTestUtils.makeCacheEntry(tenSecondsAgo, eightSecondsAgo,
hdrs, bytes);
 
@@ -2544,7 +2544,7 @@ public class TestProtocolRequirements ex
         };
 
         final byte[] bytes = new byte[128];
-        (new Random()).nextBytes(bytes);
+        new Random().nextBytes(bytes);
 
         final HttpCacheEntry entry = HttpTestUtils.makeCacheEntry(tenSecondsAgo, eightSecondsAgo,
hdrs, bytes);
 
@@ -2592,7 +2592,7 @@ public class TestProtocolRequirements ex
         };
 
         final byte[] bytes = new byte[128];
-        (new Random()).nextBytes(bytes);
+        new Random().nextBytes(bytes);
 
         final HttpCacheEntry entry = HttpTestUtils.makeCacheEntry(tenSecondsAgo, eightSecondsAgo,
hdrs, bytes);
 
@@ -2811,7 +2811,7 @@ public class TestProtocolRequirements ex
         };
 
         final byte[] bytes = new byte[128];
-        (new Random()).nextBytes(bytes);
+        new Random().nextBytes(bytes);
 
         final HttpCacheEntry entry = HttpTestUtils.makeCacheEntry(tenSecondsAgo, eightSecondsAgo,
hdrs, bytes);
 
@@ -2862,7 +2862,7 @@ public class TestProtocolRequirements ex
         };
 
         final byte[] bytes = new byte[128];
-        (new Random()).nextBytes(bytes);
+        new Random().nextBytes(bytes);
 
         final HttpCacheEntry entry = HttpTestUtils.makeCacheEntry(requestTime, responseTime,
hdrs, bytes);
 

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestResponseCachingPolicy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestResponseCachingPolicy.java?rev=1558069&r1=1558068&r2=1558069&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestResponseCachingPolicy.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestResponseCachingPolicy.java
Tue Jan 14 15:07:14 2014
@@ -667,7 +667,7 @@ public class TestResponseCachingPolicy {
     }
 
     private int getRandomStatus() {
-        final int rnd = (new Random()).nextInt(acceptableCodes.length);
+        final int rnd = new Random().nextInt(acceptableCodes.length);
 
         return acceptableCodes[rnd];
     }



Mime
View raw message