Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2019-07-25 15:12:26 +0000
committerThomas Watson2019-07-25 15:12:26 +0000
commit5af34cbde59d711f206e78233e8a21826b080cd0 (patch)
treef1367e5a9695c876a18af9a45c6b8ea141ec7385 /bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage
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>
Diffstat (limited to 'bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage')
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/StorageUtil.java16
1 files changed, 11 insertions, 5 deletions
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