You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2016/08/13 15:40:23 UTC

svn commit: r1756280 - /httpcomponents/httpclient/trunk/httpclient5-osgi/src/main/java/org/apache/hc/client5/http/osgi/impl/HttpProxyConfigurationActivator.java

Author: olegk
Date: Sat Aug 13 15:40:23 2016
New Revision: 1756280

URL: http://svn.apache.org/viewvc?rev=1756280&view=rev
Log:
All services registered in the OSGi service registry provide the whole bundle header dictionary as vendor property value.
Contributed by Christoph Fiehe <christoph.fiehe at materna.de>

Modified:
    httpcomponents/httpclient/trunk/httpclient5-osgi/src/main/java/org/apache/hc/client5/http/osgi/impl/HttpProxyConfigurationActivator.java

Modified: httpcomponents/httpclient/trunk/httpclient5-osgi/src/main/java/org/apache/hc/client5/http/osgi/impl/HttpProxyConfigurationActivator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5-osgi/src/main/java/org/apache/hc/client5/http/osgi/impl/HttpProxyConfigurationActivator.java?rev=1756280&r1=1756279&r2=1756280&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5-osgi/src/main/java/org/apache/hc/client5/http/osgi/impl/HttpProxyConfigurationActivator.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5-osgi/src/main/java/org/apache/hc/client5/http/osgi/impl/HttpProxyConfigurationActivator.java Sat Aug 13 15:40:23 2016
@@ -95,14 +95,14 @@ public final class HttpProxyConfiguratio
         // ensure we receive configurations for the proxy selector
         final Hashtable<String, Object> props = new Hashtable<>();
         props.put(Constants.SERVICE_PID, getName());
-        props.put(Constants.SERVICE_VENDOR, context.getBundle().getHeaders(Constants.BUNDLE_VENDOR));
+        props.put(Constants.SERVICE_VENDOR, context.getBundle().getHeaders().get(Constants.BUNDLE_VENDOR));
         props.put(Constants.SERVICE_DESCRIPTION, PROXY_SERVICE_FACTORY_NAME);
 
         configurator = context.registerService(ManagedServiceFactory.class, this, props);
 
         props.clear();
         props.put(Constants.SERVICE_PID, TRUSTED_HOSTS_PID);
-        props.put(Constants.SERVICE_VENDOR, context.getBundle().getHeaders(Constants.BUNDLE_VENDOR));
+        props.put(Constants.SERVICE_VENDOR, context.getBundle().getHeaders().get(Constants.BUNDLE_VENDOR));
         props.put(Constants.SERVICE_DESCRIPTION, TRUSTED_HOSTS_SERVICE_NAME);
         trustedHostConfiguration = context.registerService(ManagedService.class,
                                                            new OSGiTrustedHostsConfiguration(),
@@ -110,7 +110,7 @@ public final class HttpProxyConfiguratio
 
         props.clear();
         props.put(Constants.SERVICE_PID, BUILDER_FACTORY_SERVICE_PID);
-        props.put(Constants.SERVICE_VENDOR, context.getBundle().getHeaders(Constants.BUNDLE_VENDOR));
+        props.put(Constants.SERVICE_VENDOR, context.getBundle().getHeaders().get(Constants.BUNDLE_VENDOR));
         props.put(Constants.SERVICE_DESCRIPTION, BUILDER_FACTORY_SERVICE_NAME);
         clientFactory = context.registerService(HttpClientBuilderFactory.class,
                                                 new OSGiClientBuilderFactory(context,
@@ -121,7 +121,7 @@ public final class HttpProxyConfiguratio
 
         props.clear();
         props.put(Constants.SERVICE_PID, CACHEABLE_BUILDER_FACTORY_SERVICE_PID);
-        props.put(Constants.SERVICE_VENDOR, context.getBundle().getHeaders(Constants.BUNDLE_VENDOR));
+        props.put(Constants.SERVICE_VENDOR, context.getBundle().getHeaders().get(Constants.BUNDLE_VENDOR));
         props.put(Constants.SERVICE_DESCRIPTION, CACHEABLE_BUILDER_FACTORY_SERVICE_NAME);
         cachingClientFactory = context.registerService(CachingHttpClientBuilderFactory.class,
                                                        new OSGiCachingClientBuilderFactory(context,