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..1c7d723f18f40bc492173c2cfbbb0ce8bc516099 100644 |
--- a/src/org/adblockplus/brazil/BaseRequestHandler.java |
+++ b/src/org/adblockplus/brazil/BaseRequestHandler.java |
@@ -26,38 +26,38 @@ import sunlabs.brazil.util.http.MimeHeaders; |
public abstract class BaseRequestHandler implements Handler |
{ |
+ public final static String PROXY_HOST = "proxyHost"; |
+ public final static String PROXY_PORT = "proxyPort"; |
+ public final static String AUTH = "auth"; |
- 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; |
+ |
+ this.proxyHost = props.getProperty(prefix + PROXY_HOST); |
- proxyHost = props.getProperty(prefix + PROXY_HOST); |
+ final String s = props.getProperty(prefix + PROXY_PORT); |
- String s = props.getProperty(prefix + PROXY_PORT); |
try |
{ |
- proxyPort = Integer.decode(s).intValue(); |
+ this.proxyPort = Integer.decode(s).intValue(); |
} |
- catch (Exception e) |
+ catch (final Exception e) |
{ |
} |
- auth = props.getProperty(prefix + AUTH); |
+ this.auth = props.getProperty(prefix + AUTH); |
- shouldLogHeaders = (server.props.getProperty(prefix + "proxylog") != null); |
+ this.shouldLogHeaders = (server.props.getProperty(prefix + "proxylog") != null); |
return true; |
} |
@@ -65,10 +65,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) |