diff options
Diffstat (limited to 'bundles')
3 files changed, 18 insertions, 12 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/SystemBundleActivator.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/SystemBundleActivator.java index 9e9b97276..4cb0b3ca1 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/SystemBundleActivator.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/SystemBundleActivator.java @@ -220,9 +220,7 @@ public class SystemBundleActivator implements BundleActivator { private void register(BundleContext context, String serviceClass, Object service, boolean setRanking, Dictionary<String, Object> properties) { if (properties == null) - properties = new Hashtable<>(7); - Dictionary<String, String> headers = context.getBundle().getHeaders(); - properties.put(Constants.SERVICE_VENDOR, headers.get(Constants.BUNDLE_VENDOR)); + properties = new Hashtable<>(); if (setRanking) { properties.put(Constants.SERVICE_RANKING, Integer.valueOf(Integer.MAX_VALUE)); } diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EquinoxLogServices.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EquinoxLogServices.java index 1c1fba7ae..32ed55210 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EquinoxLogServices.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EquinoxLogServices.java @@ -24,7 +24,11 @@ import org.eclipse.osgi.framework.log.FrameworkLogEntry; import org.eclipse.osgi.internal.framework.EquinoxConfiguration; import org.eclipse.osgi.service.datalocation.Location; import org.eclipse.osgi.storage.StorageUtil; -import org.osgi.framework.*; +import org.osgi.framework.Bundle; +import org.osgi.framework.BundleContext; +import org.osgi.framework.BundleException; +import org.osgi.framework.Constants; +import org.osgi.framework.ServiceRegistration; import org.osgi.service.log.LogLevel; import org.osgi.service.log.admin.LoggerContext; @@ -133,10 +137,8 @@ public class EquinoxLogServices { private ServiceRegistration<?> registerPerformanceLog(BundleContext context) { Object service = createPerformanceLog(context.getBundle()); String serviceName = FrameworkLog.class.getName(); - Dictionary<String, Object> serviceProperties = new Hashtable<>(7); - Dictionary<String, String> headers = context.getBundle().getHeaders(); + Dictionary<String, Object> serviceProperties = new Hashtable<>(); - serviceProperties.put(Constants.SERVICE_VENDOR, headers.get(Constants.BUNDLE_VENDOR)); serviceProperties.put(Constants.SERVICE_RANKING, Integer.valueOf(Integer.MIN_VALUE)); serviceProperties.put(Constants.SERVICE_PID, context.getBundle().getBundleId() + '.' + service.getClass().getName()); serviceProperties.put(FrameworkLog.SERVICE_PERFORMANCE, Boolean.TRUE.toString()); diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/StorageUtil.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/StorageUtil.java index bc4f57024..de8f3f794 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/StorageUtil.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/StorageUtil.java @@ -14,14 +14,22 @@ package org.eclipse.osgi.storage; -import java.io.*; +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; import java.net.MalformedURLException; import java.net.URL; import java.util.Dictionary; import java.util.Hashtable; import java.util.concurrent.TimeUnit; import org.eclipse.osgi.internal.debug.Debug; -import org.osgi.framework.*; +import org.osgi.framework.BundleContext; +import org.osgi.framework.Constants; +import org.osgi.framework.ServiceRegistration; /** * A utility class with some generally useful static methods for adaptor hook implementations @@ -154,9 +162,7 @@ public class StorageUtil { * @return the service registration object */ public static ServiceRegistration<?> register(String name, Object service, BundleContext context) { - Dictionary<String, Object> properties = new Hashtable<>(7); - Dictionary<String, String> headers = context.getBundle().getHeaders(); - properties.put(Constants.SERVICE_VENDOR, headers.get(Constants.BUNDLE_VENDOR)); + Dictionary<String, Object> properties = new Hashtable<>(); properties.put(Constants.SERVICE_RANKING, Integer.valueOf(Integer.MAX_VALUE)); properties.put(Constants.SERVICE_PID, context.getBundle().getBundleId() + "." + service.getClass().getName()); //$NON-NLS-1$ return context.registerService(name, service, properties); |