From da69db639c10f0f3a994fa92fbbfae61a8578a19 Mon Sep 17 00:00:00 2001 From: Sebastian Bazley Date: Mon, 24 Feb 2014 18:33:10 +0000 Subject: [PATCH] Eliminate repeated boxing git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1571385 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/http/osgi/impl/OSGiProxyConfiguration.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/httpclient-osgi/src/main/java/org/apache/http/osgi/impl/OSGiProxyConfiguration.java b/httpclient-osgi/src/main/java/org/apache/http/osgi/impl/OSGiProxyConfiguration.java index c6cb8b686..39ba62533 100644 --- a/httpclient-osgi/src/main/java/org/apache/http/osgi/impl/OSGiProxyConfiguration.java +++ b/httpclient-osgi/src/main/java/org/apache/http/osgi/impl/OSGiProxyConfiguration.java @@ -43,7 +43,7 @@ public final class OSGiProxyConfiguration implements ProxyConfiguration { */ 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 OSGiProxyConfiguration implements ProxyConfiguration { */ 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 OSGiProxyConfiguration implements ProxyConfiguration { } public void update(final Dictionary 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);