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); Collections.sort(variantHeaderNames);
StringBuilder buf; final StringBuilder buf;
try { try {
buf = new StringBuilder("{"); buf = new StringBuilder("{");
boolean first = true; 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 VersionInfo vi = VersionInfo.loadVersionInfo("org.apache.hc.client5", getClass().getClassLoader());
final String release = (vi != null) ? vi.getRelease() : VersionInfo.UNAVAILABLE; final String release = (vi != null) ? vi.getRelease() : VersionInfo.UNAVAILABLE;
String value; final String value;
final int major = pv.getMajor(); final int major = pv.getMajor();
final int minor = pv.getMinor(); final int minor = pv.getMinor();
if ("http".equalsIgnoreCase(pv.getProtocol())) { if ("http".equalsIgnoreCase(pv.getProtocol())) {

View File

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

View File

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