Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/org/adblockplus/brazil/BaseRequestHandler.java

Issue 5697499218051072: Usage of new API, cleanups (reduced) (Closed)
Patch Set: Fixed leftover first-batch review issues. Created April 16, 2014, 5:51 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/org/adblockplus/brazil/BaseRequestHandler.java
diff --git a/src/org/adblockplus/brazil/BaseRequestHandler.java b/src/org/adblockplus/brazil/BaseRequestHandler.java
index 1378a91113c0fba0fc8899349f34ad3153d16cf3..df7a1979dafc4e08f98463ae2ae890f50d2621d1 100644
--- a/src/org/adblockplus/brazil/BaseRequestHandler.java
+++ b/src/org/adblockplus/brazil/BaseRequestHandler.java
@@ -26,32 +26,31 @@ import sunlabs.brazil.util.http.MimeHeaders;
public abstract class BaseRequestHandler implements Handler
{
-
public static final String PROXY_HOST = "proxyHost";
public static final String PROXY_PORT = "proxyPort";
public static final String AUTH = "auth";
+
protected String proxyHost;
protected int proxyPort = 80;
protected String auth;
protected boolean shouldLogHeaders;
-
protected String prefix;
@Override
- public boolean init(Server server, String prefix)
+ public boolean init(final Server server, final String prefix)
{
this.prefix = prefix;
- Properties props = server.props;
+ final Properties props = server.props;
proxyHost = props.getProperty(prefix + PROXY_HOST);
- String s = props.getProperty(prefix + PROXY_PORT);
+ final String s = props.getProperty(prefix + PROXY_PORT);
try
{
proxyPort = Integer.decode(s).intValue();
}
- catch (Exception e)
+ catch (final Exception e)
{
}
@@ -65,10 +64,10 @@ public abstract class BaseRequestHandler implements Handler
/**
* Dump the headers on stderr
*/
- public static String dumpHeaders(int count, Request request, MimeHeaders headers, boolean sent)
+ public static String dumpHeaders(final int count, final Request request, final MimeHeaders headers, final boolean sent)
{
String prompt;
- StringBuffer sb = new StringBuffer();
+ final StringBuffer sb = new StringBuffer();
String label = " " + count;
label = label.substring(label.length() - 4);
if (sent)
« no previous file with comments | « src/org/adblockplus/android/updater/UpdaterService.java ('k') | src/org/adblockplus/brazil/RequestHandler.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld