hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1571385 - /httpcomponents/httpclient/trunk/httpclient-osgi/src/main/java/org/apache/http/osgi/impl/OSGiProxyConfiguration.java
Date Mon, 24 Feb 2014 18:33:10 GMT
Author: sebb
Date: Mon Feb 24 18:33:10 2014
New Revision: 1571385

URL: http://svn.apache.org/r1571385
Log:
Eliminate repeated boxing

Modified:
    httpcomponents/httpclient/trunk/httpclient-osgi/src/main/java/org/apache/http/osgi/impl/OSGiProxyConfiguration.java

Modified: httpcomponents/httpclient/trunk/httpclient-osgi/src/main/java/org/apache/http/osgi/impl/OSGiProxyConfiguration.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-osgi/src/main/java/org/apache/http/osgi/impl/OSGiProxyConfiguration.java?rev=1571385&r1=1571384&r2=1571385&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-osgi/src/main/java/org/apache/http/osgi/impl/OSGiProxyConfiguration.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient-osgi/src/main/java/org/apache/http/osgi/impl/OSGiProxyConfiguration.java
Mon Feb 24 18:33:10 2014
@@ -43,7 +43,7 @@ public final class OSGiProxyConfiguratio
      */
     private static final String PROPERTYNAME_PROXY_ENABLED = "proxy.enabled";
 
-    private static final boolean PROPERTYDEFAULT_PROXY_ENABLED = true;
+    private static final Boolean PROPERTYDEFAULT_PROXY_ENABLED = Boolean.TRUE;
 
     /**
      * Property representing the hostname of the proxy. Defaults to empty.
@@ -57,7 +57,7 @@ public final class OSGiProxyConfiguratio
      */
     private static final String PROPERTYNAME_PROXY_PORT = "proxy.port";
 
-    private static final int PROPERTYDEFAULT_PROXY_PORT = 0;
+    private static final Integer PROPERTYDEFAULT_PROXY_PORT = Integer.valueOf(0);
 
     /**
      * Property representing the username to authenticate with towards the proxy. Defaults
to empty.
@@ -124,9 +124,9 @@ public final class OSGiProxyConfiguratio
     }
 
     public void update(final Dictionary<String, Object> config) {
-        enabled = to(config.get(PROPERTYNAME_PROXY_ENABLED), boolean.class, PROPERTYDEFAULT_PROXY_ENABLED);
+        enabled = to(config.get(PROPERTYNAME_PROXY_ENABLED), boolean.class, PROPERTYDEFAULT_PROXY_ENABLED).booleanValue();
         hostname = to(config.get(PROPERTYNAME_PROXY_HOSTNAME), String.class, PROPERTYDEFAULT_PROXY_HOSTNAME);
-        port = to(config.get(PROPERTYNAME_PROXY_PORT), int.class, PROPERTYDEFAULT_PROXY_PORT);
+        port = to(config.get(PROPERTYNAME_PROXY_PORT), int.class, PROPERTYDEFAULT_PROXY_PORT).intValue();
         username = to(config.get(PROPERTYNAME_PROXY_USERNAME), String.class, PROPERTYDEFAULT_PROXY_USERNAME);
         password = to(config.get(PROPERTYNAME_PROXY_PASSWORD), String.class, PROPERTYDEFAULT_PROXY_PASSWORD);
         proxyExceptions = to(config.get(PROPERTYNAME_PROXY_EXCEPTIONS), String[].class, PROPERTYDEFAULT_PROXY_EXCEPTIONS);



Mime
View raw message