Skip to content

Commit

Permalink
Use final.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1757448 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
garydgregory committed Aug 23, 2016
1 parent 1aff9e9 commit a24b592
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Expand Up @@ -154,7 +154,7 @@ public String getVariantKey(final HttpRequest req, final HttpCacheEntry entry) {
}
Collections.sort(variantHeaderNames);

StringBuilder buf;
final StringBuilder buf;
try {
buf = new StringBuilder("{");
boolean first = true;
Expand Down
Expand Up @@ -526,7 +526,7 @@ private String generateViaHeader(final HttpMessage msg) {
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())) {
Expand Down
Expand Up @@ -67,7 +67,7 @@ public Resource generate(
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 {
Expand Down
Expand Up @@ -58,7 +58,7 @@ public MemcachedCacheEntryImpl() {
@Override
synchronized public byte[] toByteArray() {
final ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream oos;
final ObjectOutputStream oos;
try {
oos = new ObjectOutputStream(bos);
oos.writeObject(this.key);
Expand Down Expand Up @@ -92,9 +92,9 @@ public synchronized HttpCacheEntry getHttpCacheEntry() {
@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();
Expand Down

0 comments on commit a24b592

Please sign in to comment.