hc-commits mailing list archives

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

URL: http://svn.apache.org/r1571387
Log:
fewer boxing conversions needed when stored as an object

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=1571387&r1=1571386&r2=1571387&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:41:11 2014
@@ -81,11 +81,11 @@ public final class OSGiProxyConfiguratio
 
     private static final String[] PROPERTYDEFAULT_PROXY_EXCEPTIONS = new String[]{"localhost",
"127.0.0.1"};
 
-    private boolean enabled;
+    private Boolean enabled = Boolean.FALSE; // fewer boxing conversions needed when stored
as an object
 
     private String hostname;
 
-    private int port;
+    private Integer port = Integer.valueOf(0); // fewer boxing conversions needed when stored
as an object
 
     private String username;
 
@@ -95,7 +95,7 @@ public final class OSGiProxyConfiguratio
 
     @Override
     public boolean isEnabled() {
-        return enabled;
+        return enabled.booleanValue();
     }
 
     @Override
@@ -105,7 +105,7 @@ public final class OSGiProxyConfiguratio
 
     @Override
     public int getPort() {
-        return port;
+        return port.intValue();
     }
 
     @Override
@@ -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).booleanValue();
+        enabled = to(config.get(PROPERTYNAME_PROXY_ENABLED), boolean.class, PROPERTYDEFAULT_PROXY_ENABLED);
         hostname = to(config.get(PROPERTYNAME_PROXY_HOSTNAME), String.class, PROPERTYDEFAULT_PROXY_HOSTNAME);
-        port = to(config.get(PROPERTYNAME_PROXY_PORT), int.class, PROPERTYDEFAULT_PROXY_PORT).intValue();
+        port = to(config.get(PROPERTYNAME_PROXY_PORT), int.class, PROPERTYDEFAULT_PROXY_PORT);
         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