Remove useless parens.
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1558069 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fe84b2934c
commit
f67e596013
|
@ -252,7 +252,7 @@ public class HttpTestUtils {
|
||||||
|
|
||||||
public static byte[] getRandomBytes(final int nbytes) {
|
public static byte[] getRandomBytes(final int nbytes) {
|
||||||
final byte[] bytes = new byte[nbytes];
|
final byte[] bytes = new byte[nbytes];
|
||||||
(new Random()).nextBytes(bytes);
|
new Random().nextBytes(bytes);
|
||||||
return bytes;
|
return bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -145,7 +145,7 @@ public class TestProtocolDeviations {
|
||||||
|
|
||||||
private HttpEntity makeBody(final int nbytes) {
|
private HttpEntity makeBody(final int nbytes) {
|
||||||
final byte[] bytes = new byte[nbytes];
|
final byte[] bytes = new byte[nbytes];
|
||||||
(new Random()).nextBytes(bytes);
|
new Random().nextBytes(bytes);
|
||||||
return new ByteArrayEntity(bytes);
|
return new ByteArrayEntity(bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@ public class TestProtocolDeviations {
|
||||||
HTTP_1_1);
|
HTTP_1_1);
|
||||||
|
|
||||||
final byte[] bytes = new byte[128];
|
final byte[] bytes = new byte[128];
|
||||||
(new Random()).nextBytes(bytes);
|
new Random().nextBytes(bytes);
|
||||||
|
|
||||||
final HttpEntity mockBody = EasyMock.createMockBuilder(ByteArrayEntity.class).withConstructor(
|
final HttpEntity mockBody = EasyMock.createMockBuilder(ByteArrayEntity.class).withConstructor(
|
||||||
new Object[] { bytes }).addMockedMethods("getContentLength").createNiceMock();
|
new Object[] { bytes }).addMockedMethods("getContentLength").createNiceMock();
|
||||||
|
|
|
@ -1782,7 +1782,7 @@ public class TestProtocolRequirements extends AbstractProtocolTest {
|
||||||
originResponse.setHeader("Content-Range", "bytes 0-50/128");
|
originResponse.setHeader("Content-Range", "bytes 0-50/128");
|
||||||
originResponse.setHeader("Cache-Control", "max-age=3600");
|
originResponse.setHeader("Cache-Control", "max-age=3600");
|
||||||
final byte[] bytes = new byte[51];
|
final byte[] bytes = new byte[51];
|
||||||
(new Random()).nextBytes(bytes);
|
new Random().nextBytes(bytes);
|
||||||
originResponse.setEntity(new ByteArrayEntity(bytes));
|
originResponse.setEntity(new ByteArrayEntity(bytes));
|
||||||
|
|
||||||
EasyMock.expect(
|
EasyMock.expect(
|
||||||
|
@ -2486,7 +2486,7 @@ public class TestProtocolRequirements extends AbstractProtocolTest {
|
||||||
};
|
};
|
||||||
|
|
||||||
final byte[] bytes = new byte[128];
|
final byte[] bytes = new byte[128];
|
||||||
(new Random()).nextBytes(bytes);
|
new Random().nextBytes(bytes);
|
||||||
|
|
||||||
final HttpCacheEntry entry = HttpTestUtils.makeCacheEntry(tenSecondsAgo, eightSecondsAgo, hdrs, bytes);
|
final HttpCacheEntry entry = HttpTestUtils.makeCacheEntry(tenSecondsAgo, eightSecondsAgo, hdrs, bytes);
|
||||||
|
|
||||||
|
@ -2544,7 +2544,7 @@ public class TestProtocolRequirements extends AbstractProtocolTest {
|
||||||
};
|
};
|
||||||
|
|
||||||
final byte[] bytes = new byte[128];
|
final byte[] bytes = new byte[128];
|
||||||
(new Random()).nextBytes(bytes);
|
new Random().nextBytes(bytes);
|
||||||
|
|
||||||
final HttpCacheEntry entry = HttpTestUtils.makeCacheEntry(tenSecondsAgo, eightSecondsAgo, hdrs, bytes);
|
final HttpCacheEntry entry = HttpTestUtils.makeCacheEntry(tenSecondsAgo, eightSecondsAgo, hdrs, bytes);
|
||||||
|
|
||||||
|
@ -2592,7 +2592,7 @@ public class TestProtocolRequirements extends AbstractProtocolTest {
|
||||||
};
|
};
|
||||||
|
|
||||||
final byte[] bytes = new byte[128];
|
final byte[] bytes = new byte[128];
|
||||||
(new Random()).nextBytes(bytes);
|
new Random().nextBytes(bytes);
|
||||||
|
|
||||||
final HttpCacheEntry entry = HttpTestUtils.makeCacheEntry(tenSecondsAgo, eightSecondsAgo, hdrs, bytes);
|
final HttpCacheEntry entry = HttpTestUtils.makeCacheEntry(tenSecondsAgo, eightSecondsAgo, hdrs, bytes);
|
||||||
|
|
||||||
|
@ -2811,7 +2811,7 @@ public class TestProtocolRequirements extends AbstractProtocolTest {
|
||||||
};
|
};
|
||||||
|
|
||||||
final byte[] bytes = new byte[128];
|
final byte[] bytes = new byte[128];
|
||||||
(new Random()).nextBytes(bytes);
|
new Random().nextBytes(bytes);
|
||||||
|
|
||||||
final HttpCacheEntry entry = HttpTestUtils.makeCacheEntry(tenSecondsAgo, eightSecondsAgo, hdrs, bytes);
|
final HttpCacheEntry entry = HttpTestUtils.makeCacheEntry(tenSecondsAgo, eightSecondsAgo, hdrs, bytes);
|
||||||
|
|
||||||
|
@ -2862,7 +2862,7 @@ public class TestProtocolRequirements extends AbstractProtocolTest {
|
||||||
};
|
};
|
||||||
|
|
||||||
final byte[] bytes = new byte[128];
|
final byte[] bytes = new byte[128];
|
||||||
(new Random()).nextBytes(bytes);
|
new Random().nextBytes(bytes);
|
||||||
|
|
||||||
final HttpCacheEntry entry = HttpTestUtils.makeCacheEntry(requestTime, responseTime, hdrs, bytes);
|
final HttpCacheEntry entry = HttpTestUtils.makeCacheEntry(requestTime, responseTime, hdrs, bytes);
|
||||||
|
|
||||||
|
|
|
@ -667,7 +667,7 @@ public class TestResponseCachingPolicy {
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getRandomStatus() {
|
private int getRandomStatus() {
|
||||||
final int rnd = (new Random()).nextInt(acceptableCodes.length);
|
final int rnd = new Random().nextInt(acceptableCodes.length);
|
||||||
|
|
||||||
return acceptableCodes[rnd];
|
return acceptableCodes[rnd];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue