Details
-
Type: Bug
-
Status: Closed (View Workflow)
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.7
-
Component/s: o.c.common.util
-
Labels:None
-
Environment:
Android
Description
I don't know if this is correct or not but thought I would raise it in case because it looks a little odd.
Should the ProxySelectorRoutePlanner and setRoutePlanner lines below be in the preceding proxy related if statement. Also, the last line isn't indented correctly which could cause confusion.
public WebResource(URI theURI, String theProxyHost, Integer theProxyPort, int theTimeout) {
uri = theURI;
client = new DefaultHttpClient();
HttpParams params = client.getParams();
// Allowable time between packets
HttpConnectionParams.setSoTimeout(params, theTimeout);
// Allowable time to get a connection
HttpConnectionParams.setConnectionTimeout(params, theTimeout);
// Configure proxy info if necessary and defined
if (theProxyHost != null && theProxyHost.length() > 0)
ProxySelectorRoutePlanner routePlanner = new ProxySelectorRoutePlanner(
client.getConnectionManager().getSchemeRegistry(),
ProxySelector.getDefault());
((AbstractHttpClient) client).setRoutePlanner(routePlanner);
}