Use final.

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1757448 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary D. Gregory 2016-08-23 22:27:27 +00:00
parent 1aff9e9220
commit a24b592e87
4 changed files with 7 additions and 7 deletions

View File

@ -154,7 +154,7 @@ class CacheKeyGenerator {
}
Collections.sort(variantHeaderNames);
StringBuilder buf;
final StringBuilder buf;
try {
buf = new StringBuilder("{");
boolean first = true;

View File

@ -526,7 +526,7 @@ public class CachingExec implements ClientExecChain {
final VersionInfo vi = VersionInfo.loadVersionInfo("org.apache.hc.client5", getClass().getClassLoader());
final String release = (vi != null) ? vi.getRelease() : VersionInfo.UNAVAILABLE;
String value;
final String value;
final int major = pv.getMajor();
final int minor = pv.getMinor();
if ("http".equalsIgnoreCase(pv.getProtocol())) {

View File

@ -67,7 +67,7 @@ public class HeapResourceFactory implements ResourceFactory {
public Resource copy(
final String requestId,
final Resource resource) throws IOException {
byte[] body;
final byte[] body;
if (resource instanceof HeapResource) {
body = ((HeapResource) resource).getByteArray();
} else {

View File

@ -58,7 +58,7 @@ public class MemcachedCacheEntryImpl implements MemcachedCacheEntry {
@Override
synchronized public byte[] toByteArray() {
final ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream oos;
final ObjectOutputStream oos;
try {
oos = new ObjectOutputStream(bos);
oos.writeObject(this.key);
@ -92,9 +92,9 @@ public class MemcachedCacheEntryImpl implements MemcachedCacheEntry {
@Override
synchronized public void set(final byte[] bytes) {
final ByteArrayInputStream bis = new ByteArrayInputStream(bytes);
ObjectInputStream ois;
String s;
HttpCacheEntry entry;
final ObjectInputStream ois;
final String s;
final HttpCacheEntry entry;
try {
ois = new ObjectInputStream(bis);
s = (String)ois.readObject();