Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2019-07-25 11:12:26 -0400
committerThomas Watson2019-07-25 11:12:26 -0400
commit5af34cbde59d711f206e78233e8a21826b080cd0 (patch)
treef1367e5a9695c876a18af9a45c6b8ea141ec7385
parentbe45ac216a8a6ed7ff3ca24bf6639359717810a8 (diff)
downloadrt.equinox.framework-5af34cbde59d711f206e78233e8a21826b080cd0.tar.gz
rt.equinox.framework-5af34cbde59d711f206e78233e8a21826b080cd0.tar.xz
rt.equinox.framework-5af34cbde59d711f206e78233e8a21826b080cd0.zip
This property required parsing and translating the system bundle manifest. That takes some time and isn't worth it just to have a service.vender property that provides little to no value. Change-Id: I18ae5aeabc204acd87d5c849521bc497160f01c9 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/SystemBundleActivator.java4
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EquinoxLogServices.java10
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/StorageUtil.java16
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);

Back to the top