Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.osgi/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxContainerAdaptor.java2
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AdaptPermission.java3
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AdminPermission.java7
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AllServiceListener.java3
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleContext.java3
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleListener.java3
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundlePermission.java2
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/CapabilityPermission.java6
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Filter.java5
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkEvent.java16
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkListener.java3
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkUtil.java5
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/PackagePermission.java7
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/PrototypeServiceFactory.java4
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceListener.java3
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceObjects.java46
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServicePermission.java11
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceReference.java3
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/SynchronousBundleListener.java3
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/UnfilteredServiceListener.java3
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Version.java5
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/VersionRange.java7
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/dto/ServiceReferenceDTO.java2
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/ListenerHook.java4
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/launch/Framework.java17
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/HostNamespace.java2
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/NativeNamespace.java15
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/package-info.java10
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/packageinfo2
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleCapability.java6
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRequirement.java6
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRevision.java4
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWire.java7
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWiring.java16
35 files changed, 159 insertions, 84 deletions
diff --git a/bundles/org.eclipse.osgi/META-INF/MANIFEST.MF b/bundles/org.eclipse.osgi/META-INF/MANIFEST.MF
index cb69e00b5..e2aabff9f 100644
--- a/bundles/org.eclipse.osgi/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.osgi/META-INF/MANIFEST.MF
@@ -52,7 +52,7 @@ Export-Package: org.eclipse.core.runtime.adaptor;x-friends:="org.eclipse.core.ru
org.eclipse.osgi.storagemanager;version="1.0",
org.eclipse.osgi.util;version="1.1",
org.osgi.dto;version="1.0",
- org.osgi.framework;version="1.8",
+ org.osgi.framework;version="1.9",
org.osgi.framework.dto;version="1.8";uses:="org.osgi.dto",
org.osgi.framework.hooks.bundle;version="1.1";uses:="org.osgi.framework",
org.osgi.framework.hooks.resolver;version="1.0";uses:="org.osgi.framework.wiring",
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxContainerAdaptor.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxContainerAdaptor.java
index 282bfb7e1..f02e02d30 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxContainerAdaptor.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxContainerAdaptor.java
@@ -262,7 +262,7 @@ public class EquinoxContainerAdaptor extends ModuleContainerAdaptor {
case STOPPED :
return FrameworkEvent.STOPPED;
case STOPPED_REFRESH :
- return FrameworkEvent.STOPPED_BOOTCLASSPATH_MODIFIED;
+ return FrameworkEvent.STOPPED_SYSTEM_REFRESHED;
case STOPPED_UPDATE :
return FrameworkEvent.STOPPED_UPDATE;
case STOPPED_TIMEOUT :
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AdaptPermission.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AdaptPermission.java
index 9f0866e63..e5adf8136 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AdaptPermission.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AdaptPermission.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2010, 2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2010, 2015). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -443,6 +443,7 @@ public final class AdaptPermission extends BasicPermission {
map.put("adaptClass", getName());
if (bundle != null) {
AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ @Override
public Void run() {
map.put("id", new Long(bundle.getBundleId()));
map.put("location", bundle.getLocation());
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AdminPermission.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AdminPermission.java
index 2a803b07d..9a3e460a5 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AdminPermission.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AdminPermission.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2015). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -298,7 +298,7 @@ public final class AdminPermission extends BasicPermission {
if (bundle == null) {
throw new IllegalArgumentException("bundle must not be null");
}
- StringBuffer sb = new StringBuffer("(id=");
+ StringBuilder sb = new StringBuilder("(id=");
sb.append(bundle.getBundleId());
sb.append(")");
return sb.toString();
@@ -672,7 +672,7 @@ public final class AdminPermission extends BasicPermission {
public String getActions() {
String result = actions;
if (result == null) {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
int mask = action_mask;
if ((mask & ACTION_CLASS) == ACTION_CLASS) {
@@ -843,6 +843,7 @@ public final class AdminPermission extends BasicPermission {
try {
final Map<String, Object> map = new HashMap<String, Object>(4);
AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ @Override
public Void run() {
map.put("id", new Long(bundle.getBundleId()));
map.put("location", bundle.getLocation());
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AllServiceListener.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AllServiceListener.java
index fc2039183..7eba8b2b6 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AllServiceListener.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AllServiceListener.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2005, 2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2005, 2015). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -57,6 +57,7 @@ import org.osgi.annotation.versioning.ConsumerType;
* @author $Id$
*/
@ConsumerType
+@FunctionalInterface
public interface AllServiceListener extends ServiceListener {
// This is a marker interface
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleContext.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleContext.java
index fbf0b1829..6e24d39be 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleContext.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2014). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2015). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -116,6 +116,7 @@ public interface BundleContext extends BundleReference {
* {@code BundleContext}.
* @throws IllegalStateException If this BundleContext is no longer valid.
*/
+ @Override
Bundle getBundle();
/**
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleListener.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleListener.java
index 2c27d37a3..50c74faa9 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleListener.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleListener.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2015). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -38,6 +38,7 @@ import org.osgi.annotation.versioning.ConsumerType;
* @author $Id$
*/
@ConsumerType
+@FunctionalInterface
public interface BundleListener extends EventListener {
/**
* Receives notification that a bundle has had a lifecycle change.
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundlePermission.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundlePermission.java
index 5d3a115a2..ee2ceff31 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundlePermission.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundlePermission.java
@@ -314,7 +314,7 @@ public final class BundlePermission extends BasicPermission {
public String getActions() {
String result = actions;
if (result == null) {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
boolean comma = false;
if ((action_mask & ACTION_PROVIDE) == ACTION_PROVIDE) {
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/CapabilityPermission.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/CapabilityPermission.java
index 1d8e892cf..de9811c5f 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/CapabilityPermission.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/CapabilityPermission.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2015). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -387,7 +387,7 @@ public final class CapabilityPermission extends BasicPermission {
public String getActions() {
String result = actions;
if (result == null) {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
boolean comma = false;
int mask = action_mask;
@@ -507,6 +507,7 @@ public final class CapabilityPermission extends BasicPermission {
return properties = props;
}
AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ @Override
public Void run() {
props.put("id", new Long(bundle.getBundleId()));
props.put("location", bundle.getLocation());
@@ -551,6 +552,7 @@ public final class CapabilityPermission extends BasicPermission {
return attributes.get(key);
}
+ @Override
public Set<Map.Entry<String, Object>> entrySet() {
if (entries != null) {
return entries;
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Filter.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Filter.java
index 58cd4db16..b8bf786f2 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Filter.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Filter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2015). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -82,6 +82,7 @@ public interface Filter {
*
* @return This {@code Filter}'s filter string.
*/
+ @Override
String toString();
/**
@@ -96,6 +97,7 @@ public interface Filter {
* result of calling {@code this.toString().equals(obj.toString())};
* {@code false} otherwise.
*/
+ @Override
boolean equals(Object obj);
/**
@@ -107,6 +109,7 @@ public interface Filter {
*
* @return The hashCode of this {@code Filter}.
*/
+ @Override
int hashCode();
/**
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkEvent.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkEvent.java
index 7b74a6831..b3072b2d0 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkEvent.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkEvent.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2016). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
package org.osgi.framework;
import java.util.EventObject;
+
import org.osgi.framework.startlevel.FrameworkStartLevel;
import org.osgi.framework.wiring.FrameworkWiring;
@@ -169,6 +170,19 @@ public class FrameworkEvent extends EventObject {
public final static int WAIT_TIMEDOUT = 0x00000200;
/**
+ * The Framework has stopped and the framework requires a new class loader
+ * to restart.
+ * <p>
+ * This event is fired when the Framework has been stopped because of a stop
+ * operation on the system bundle and the framework requires a new class
+ * loader to be used to restart. For example, if a framework extension
+ * bundle has been refreshed. The source of this event is the System Bundle.
+ *
+ * @since 1.9
+ */
+ public final static int STOPPED_SYSTEM_REFRESHED = 0x00000400;
+
+ /**
* Creates a Framework event.
*
* @param type The event type.
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkListener.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkListener.java
index 97c76c64c..a8e5255b2 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkListener.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkListener.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2015). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -38,6 +38,7 @@ import org.osgi.annotation.versioning.ConsumerType;
* @author $Id$
*/
@ConsumerType
+@FunctionalInterface
public interface FrameworkListener extends EventListener {
/**
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkUtil.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkUtil.java
index f0f1c7490..10ce2c345 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkUtil.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkUtil.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2005, 2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2005, 2015). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -207,6 +207,7 @@ public class FrameworkUtil {
// We use doPriv since the caller may not have permission
// to call getClassLoader.
Object cl = AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ @Override
public Object run() {
return classFromBundle.getClassLoader();
}
@@ -652,7 +653,7 @@ public class FrameworkUtil {
if (dnChain == null) {
return null;
}
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
for (Iterator<?> iChain = dnChain.iterator(); iChain.hasNext();) {
sb.append(iChain.next());
if (iChain.hasNext()) {
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/PackagePermission.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/PackagePermission.java
index c2d45ff15..3ebb099ad 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/PackagePermission.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/PackagePermission.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2015). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -64,7 +64,7 @@ public final class PackagePermission extends BasicPermission {
* The action string {@code export}. The {@code export} action implies the
* {@code import} action.
*
- * @deprecated Since 1.5. Use {@code exportonly} instead.
+ * @deprecated As of 1.5. Use {@code exportonly} instead.
*/
public final static String EXPORT = "export";
@@ -429,7 +429,7 @@ public final class PackagePermission extends BasicPermission {
public String getActions() {
String result = actions;
if (result == null) {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
boolean comma = false;
int mask = action_mask;
@@ -544,6 +544,7 @@ public final class PackagePermission extends BasicPermission {
map.put("package.name", getName());
if (bundle != null) {
AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ @Override
public Void run() {
map.put("id", new Long(bundle.getBundleId()));
map.put("location", bundle.getLocation());
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/PrototypeServiceFactory.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/PrototypeServiceFactory.java
index 12129fe6e..864506fa1 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/PrototypeServiceFactory.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/PrototypeServiceFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2012, 2014). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2012, 2015). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -96,6 +96,7 @@ public interface PrototypeServiceFactory<S> extends ServiceFactory<S> {
* the classes named when the service was registered.
* @see ServiceObjects#getService()
*/
+ @Override
public S getService(Bundle bundle, ServiceRegistration<S> registration);
/**
@@ -120,5 +121,6 @@ public interface PrototypeServiceFactory<S> extends ServiceFactory<S> {
* method.
* @see ServiceObjects#ungetService(Object)
*/
+ @Override
public void ungetService(Bundle bundle, ServiceRegistration<S> registration, S service);
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceListener.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceListener.java
index 8468dbc76..e061a4c69 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceListener.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceListener.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2015). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -53,6 +53,7 @@ import org.osgi.annotation.versioning.ConsumerType;
* @author $Id$
*/
@ConsumerType
+@FunctionalInterface
public interface ServiceListener extends EventListener {
/**
* Receives notification that a service has had a lifecycle change.
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceObjects.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceObjects.java
index 99314fe28..84901895b 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceObjects.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceObjects.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2012, 2014). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2012, 2016). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,14 +20,16 @@ import org.osgi.annotation.versioning.ProviderType;
/**
* Allows multiple service objects for a service to be obtained.
- *
* <p>
* For services with {@link Constants#SCOPE_PROTOTYPE prototype} scope, multiple
- * service objects for the service can be obtained. For services with
- * {@link Constants#SCOPE_SINGLETON singleton} or {@link Constants#SCOPE_BUNDLE
- * bundle} scope, only one, use-counted service object is available to a
- * requesting bundle.
- *
+ * service objects for the service can be obtained. Since implementations of
+ * {@link PrototypeServiceFactory} can return the same service object
+ * repeatedly, the framework must use count the returned service objects to
+ * release the service object only when its use count returns to zero.
+ * <p>
+ * For services with {@link Constants#SCOPE_SINGLETON singleton} or
+ * {@link Constants#SCOPE_BUNDLE bundle} scope, only one, use-counted service
+ * object is available to a requesting bundle.
* <p>
* Any unreleased service objects obtained from this {@code ServiceObjects}
* object are automatically released by the framework when the bundle associated
@@ -46,23 +48,19 @@ public interface ServiceObjects<S> {
/**
* Returns a service object for the {@link #getServiceReference()
* associated} service.
- *
* <p>
* This {@code ServiceObjects} object can be used to obtain multiple service
* objects for the associated service if the service has
* {@link Constants#SCOPE_PROTOTYPE prototype} scope.
- *
* <p>
* If the associated service has {@link Constants#SCOPE_SINGLETON singleton}
* or {@link Constants#SCOPE_BUNDLE bundle} scope, this method behaves the
* same as calling the {@link BundleContext#getService(ServiceReference)}
* method for the associated service. That is, only one, use-counted service
* object is available from this {@link ServiceObjects} object.
- *
* <p>
* This method will always return {@code null} when the associated service
* has been unregistered.
- *
* <p>
* For a prototype scope service, the following steps are required to obtain
* a service object:
@@ -71,13 +69,16 @@ public interface ServiceObjects<S> {
* returned.</li>
* <li>The
* {@link PrototypeServiceFactory#getService(Bundle, ServiceRegistration)}
- * method is called to supply a customized service object for the caller.</li>
+ * method is called to supply a customized service object for the caller.
+ * </li>
* <li>If the service object returned by the {@code PrototypeServiceFactory}
* object is {@code null}, not an {@code instanceof} all the classes named
* when the service was registered or the {@code PrototypeServiceFactory}
* object throws an exception, {@code null} is returned and a Framework
* event of type {@link FrameworkEvent#ERROR} containing a
* {@link ServiceException} describing the error is fired.</li>
+ * <li>The use count for the customized service object is incremented by
+ * one.</li>
* <li>The customized service object is returned.</li>
* </ol>
*
@@ -87,7 +88,7 @@ public interface ServiceObjects<S> {
* classes under which it was registered or the
* {@code ServiceFactory} threw an exception.
* @throws IllegalStateException If the BundleContext used to create this
- * {@code ServiceObjects} object is no longer valid.
+ * {@code ServiceObjects} object is no longer valid.
* @see #ungetService(Object)
*/
public S getService();
@@ -95,7 +96,6 @@ public interface ServiceObjects<S> {
/**
* Releases a service object for the {@link #getServiceReference()
* associated} service.
- *
* <p>
* This {@code ServiceObjects} object can be used to obtain multiple service
* objects for the associated service if the service has
@@ -105,28 +105,30 @@ public interface ServiceObjects<S> {
* as calling the {@link BundleContext#ungetService(ServiceReference)}
* method for the associated service. That is, only one, use-counted service
* object is available from this {@link ServiceObjects} object.
- *
* <p>
* For a prototype scope service, the following steps are required to
* release a service object:
* <ol>
* <li>If the associated service has been unregistered, this method returns
* without doing anything.</li>
- * <li>The
+ * <li>The use count for the specified service object is decremented by one.
+ * </li>
+ * <li>If the use count for the specified service object is now zero, the
* {@link PrototypeServiceFactory#ungetService(Bundle, ServiceRegistration, Object)}
* method is called to release the specified service object.</li>
* </ol>
- *
* <p>
* The specified service object must no longer be used and all references to
- * it should be destroyed after calling this method.
+ * it should be destroyed after calling this method when the use count has
+ * returned to zero.
*
* @param service A service object previously provided by this
- * {@code ServiceObjects} object.
+ * {@code ServiceObjects} object.
* @throws IllegalStateException If the BundleContext used to create this
- * {@code ServiceObjects} object is no longer valid.
- * @throws IllegalArgumentException If the specified service object was not
- * provided by this {@code ServiceObjects} object.
+ * {@code ServiceObjects} object is no longer valid.
+ * @throws IllegalArgumentException If the specified service object is
+ * {@code null} or was not provided by a {@code ServiceObjects}
+ * object for the associated service.
* @see #getService()
*/
public void ungetService(S service);
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServicePermission.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServicePermission.java
index ff7fc46dd..e3b61611b 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServicePermission.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServicePermission.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2015). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -207,7 +207,7 @@ public final class ServicePermission extends BasicPermission {
if (reference == null) {
throw new IllegalArgumentException("reference must not be null");
}
- StringBuffer sb = new StringBuffer("(" + Constants.SERVICE_ID + "=");
+ StringBuilder sb = new StringBuilder("(" + Constants.SERVICE_ID + "=");
sb.append(reference.getProperty(Constants.SERVICE_ID));
sb.append(")");
return sb.toString();
@@ -443,7 +443,7 @@ public final class ServicePermission extends BasicPermission {
public String getActions() {
String result = actions;
if (result == null) {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
boolean comma = false;
int mask = action_mask;
@@ -562,6 +562,7 @@ public final class ServicePermission extends BasicPermission {
final Bundle bundle = service.getBundle();
if (bundle != null) {
AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ @Override
public Void run() {
props.put("id", new Long(bundle.getBundleId()));
props.put("location", bundle.getLocation());
@@ -607,6 +608,7 @@ public final class ServicePermission extends BasicPermission {
return service.getProperty(key);
}
+ @Override
public Set<Map.Entry<String, Object>> entrySet() {
if (entries != null) {
return entries;
@@ -632,14 +634,17 @@ public final class ServicePermission extends BasicPermission {
this.v = value;
}
+ @Override
public String getKey() {
return k;
}
+ @Override
public Object getValue() {
return v;
}
+ @Override
public Object setValue(Object value) {
throw new UnsupportedOperationException();
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceReference.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceReference.java
index a56f8df70..d561e9049 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceReference.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceReference.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2015). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -179,5 +179,6 @@ public interface ServiceReference<S> extends Comparable<Object> {
* instance as this {@code ServiceReference}.
* @since 1.4
*/
+ @Override
public int compareTo(Object reference);
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/SynchronousBundleListener.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/SynchronousBundleListener.java
index 6b50c6c9d..e1555f69b 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/SynchronousBundleListener.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/SynchronousBundleListener.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2001, 2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2001, 2015). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -62,6 +62,7 @@ import org.osgi.annotation.versioning.ConsumerType;
* @author $Id$
*/
@ConsumerType
+@FunctionalInterface
public interface SynchronousBundleListener extends BundleListener {
// This is a marker interface
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/UnfilteredServiceListener.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/UnfilteredServiceListener.java
index c68fe7ab0..ed5080773 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/UnfilteredServiceListener.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/UnfilteredServiceListener.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2011, 2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2011, 2015). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -69,6 +69,7 @@ import org.osgi.framework.hooks.service.ListenerHook;
* @author $Id$
*/
@ConsumerType
+@FunctionalInterface
public interface UnfilteredServiceListener extends ServiceListener {
// This is a marker interface
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Version.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Version.java
index c24d4d37a..c6b22d8ea 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Version.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Version.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2014). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2015). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -319,7 +319,7 @@ public class Version implements Comparable<Version> {
return s;
}
int q = qualifier.length();
- StringBuffer result = new StringBuffer(20 + q);
+ StringBuilder result = new StringBuilder(20 + q);
result.append(major);
result.append(SEPARATOR);
result.append(minor);
@@ -402,6 +402,7 @@ public class Version implements Comparable<Version> {
* @throws ClassCastException If the specified object is not a
* {@code Version} object.
*/
+ @Override
public int compareTo(Version other) {
if (other == this) { // quicktest
return 0;
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/VersionRange.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/VersionRange.java
index 1f5fa660a..e7ab9047a 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/VersionRange.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/VersionRange.java
@@ -385,12 +385,13 @@ public class VersionRange {
}
String leftVersion = left.toString();
if (right == null) {
- StringBuffer result = new StringBuffer(leftVersion.length() + 1);
+ StringBuilder result = new StringBuilder(leftVersion.length() + 1);
result.append(left.toString0());
return versionRangeString = result.toString();
}
String rightVerion = right.toString();
- StringBuffer result = new StringBuffer(leftVersion.length() + rightVerion.length() + 5);
+ StringBuilder result = new StringBuilder(
+ leftVersion.length() + rightVerion.length() + 5);
result.append(leftClosed ? LEFT_CLOSED : LEFT_OPEN);
result.append(left.toString0());
result.append(ENDPOINT_DELIMITER);
@@ -475,7 +476,7 @@ public class VersionRange {
}
}
- StringBuffer result = new StringBuffer(128);
+ StringBuilder result = new StringBuilder(128);
final boolean needPresence = !leftClosed && ((right == null) || !rightClosed);
final boolean multipleTerms = needPresence || (right != null);
if (multipleTerms) {
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/dto/ServiceReferenceDTO.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/dto/ServiceReferenceDTO.java
index 2c70b84f2..87265ded2 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/dto/ServiceReferenceDTO.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/dto/ServiceReferenceDTO.java
@@ -26,7 +26,7 @@ import org.osgi.framework.ServiceReference;
*
* <p>
* {@code ServiceReferenceDTO}s for all registered services can be obtained from
- * a {@link FrameworkDTO}. An installed Bundle can be adapted to provide a
+ * a {@link FrameworkDTO}. A started Bundle can be adapted to provide a
* {@code ServiceReferenceDTO[]} of the services registered by the Bundle. A
* {@code ServiceReferenceDTO} obtained from a framework must convert service
* property values which are not valid value types for DTOs to type
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/ListenerHook.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/ListenerHook.java
index 34bd086f7..d7cea4e51 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/ListenerHook.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/ListenerHook.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2008, 2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2015). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -119,6 +119,7 @@ public interface ListenerHook {
* object and both objects refer to the same listener for a
* given addition and removal life cycle.
*/
+ @Override
boolean equals(Object obj);
/**
@@ -126,6 +127,7 @@ public interface ListenerHook {
*
* @return The hash code of this {@code ListenerInfo}.
*/
+ @Override
int hashCode();
}
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/launch/Framework.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/launch/Framework.java
index 25b603f31..fcdc6be30 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/launch/Framework.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/launch/Framework.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2008, 2014). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2015). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -182,6 +182,7 @@ public interface Framework extends Bundle {
* Environment supports permissions.
* @see "Start Level Specification"
*/
+ @Override
void start() throws BundleException;
/**
@@ -198,6 +199,7 @@ public interface Framework extends Bundle {
* Environment supports permissions.
* @see #start()
*/
+ @Override
void start(int options) throws BundleException;
/**
@@ -233,6 +235,7 @@ public interface Framework extends Bundle {
* Environment supports permissions.
* @see "Start Level Specification"
*/
+ @Override
void stop() throws BundleException;
/**
@@ -250,6 +253,7 @@ public interface Framework extends Bundle {
* Environment supports permissions.
* @see #stop()
*/
+ @Override
void stop(int options) throws BundleException;
/**
@@ -263,6 +267,7 @@ public interface Framework extends Bundle {
* {@code AdminPermission[this,LIFECYCLE]}, and the Java Runtime
* Environment supports permissions.
*/
+ @Override
void uninstall() throws BundleException;
/**
@@ -284,6 +289,7 @@ public interface Framework extends Bundle {
* {@code AdminPermission[this,LIFECYCLE]}, and the Java Runtime
* Environment supports permissions.
*/
+ @Override
void update() throws BundleException;
/**
@@ -301,6 +307,7 @@ public interface Framework extends Bundle {
* {@code AdminPermission[this,LIFECYCLE]}, and the Java Runtime
* Environment supports permissions.
*/
+ @Override
void update(InputStream in) throws BundleException;
/**
@@ -310,6 +317,7 @@ public interface Framework extends Bundle {
* @return 0.
* @see Bundle#getBundleId()
*/
+ @Override
long getBundleId();
/**
@@ -324,6 +332,7 @@ public interface Framework extends Bundle {
* @see Bundle#getLocation()
* @see Constants#SYSTEM_BUNDLE_LOCATION
*/
+ @Override
String getLocation();
/**
@@ -337,6 +346,7 @@ public interface Framework extends Bundle {
* @see Bundle#getSymbolicName()
* @see Constants#SYSTEM_BUNDLE_SYMBOLICNAME
*/
+ @Override
String getSymbolicName();
/**
@@ -347,6 +357,7 @@ public interface Framework extends Bundle {
* @return {@code null} as a framework implementation does not have a proper
* bundle from which to return entry paths.
*/
+ @Override
Enumeration<String> getEntryPaths(String path);
/**
@@ -357,6 +368,7 @@ public interface Framework extends Bundle {
* @return {@code null} as a framework implementation does not have a proper
* bundle from which to return an entry.
*/
+ @Override
URL getEntry(String path);
/**
@@ -371,6 +383,7 @@ public interface Framework extends Bundle {
* @return The time when the set of bundles in this framework was last
* modified.
*/
+ @Override
long getLastModified();
/**
@@ -383,6 +396,7 @@ public interface Framework extends Bundle {
* @return {@code null} as a framework implementation does not have a proper
* bundle from which to return entries.
*/
+ @Override
Enumeration<URL> findEntries(String path, String filePattern, boolean recurse);
/**
@@ -402,5 +416,6 @@ public interface Framework extends Bundle {
* @return The object, of the specified type, to which this Framework has
* been adapted or {@code null} if this Framework cannot be adapted
*/
+ @Override
<A> A adapt(Class<A> type);
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/HostNamespace.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/HostNamespace.java
index a7cbf04c3..9f789ca25 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/HostNamespace.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/HostNamespace.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2012, 2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2012, 2014). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/NativeNamespace.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/NativeNamespace.java
index 0e11cacf6..fc914204c 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/NativeNamespace.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/NativeNamespace.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2012, 2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2012, 2016). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,6 +30,7 @@ import org.osgi.resource.Namespace;
* {@code String}, unless otherwise indicated.
*
* @Immutable
+ * @since 1.1
* @author $Id$
*/
public final class NativeNamespace extends Namespace {
@@ -42,9 +43,9 @@ public final class NativeNamespace extends Namespace {
/**
* The capability attribute contains alias values of the
* {@link Constants#FRAMEWORK_OS_NAME org.osgi.framework.os.name} launching
- * property value according to the <a
- * href="http://www.osgi.org/Specifications/Reference">OSGi Specification
- * References</a>. The value of this attribute must be of type
+ * property value according to the
+ * <a href="https://www.osgi.org/developer/specifications/reference/">OSGi
+ * Specification References</a>. The value of this attribute must be of type
* {@code List<String>}.
*/
public final static String CAPABILITY_OSNAME_ATTRIBUTE = NATIVE_NAMESPACE + ".osname";
@@ -60,9 +61,9 @@ public final class NativeNamespace extends Namespace {
/**
* The capability attribute contains alias values of the
* {@link Constants#FRAMEWORK_PROCESSOR org.osgi.framework.processor}
- * launching property value according to the <a
- * href="http://www.osgi.org/Specifications/Reference">OSGi Specification
- * References</a>. The value of this attribute must be of type
+ * launching property value according to the
+ * <a href="https://www.osgi.org/developer/specifications/reference/">OSGi
+ * Specification References</a>. The value of this attribute must be of type
* {@code List<String>}.
*/
public final static String CAPABILITY_PROCESSOR_ATTRIBUTE = NATIVE_NAMESPACE + ".processor";
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/package-info.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/package-info.java
index f7b9e43d8..818d4aed9 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/package-info.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/package-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2010, 2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2010, 2016). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,21 +15,19 @@
*/
/**
- * Framework Package Version 1.8.
- *
+ * Framework Package Version 1.9.
* <p>
* Bundles wishing to use this package must list the package in the
* Import-Package header of the bundle's manifest.
- *
* <p>
* Example import for consumers using the API in this package:
* <p>
- * {@code Import-Package: org.osgi.framework; version="[1.8,2.0)"}
+ * {@code Import-Package: org.osgi.framework; version="[1.9,2.0)"}
*
* @author $Id$
*/
-@Version("1.8")
+@Version("1.9")
package org.osgi.framework;
import org.osgi.annotation.versioning.Version;
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/packageinfo b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/packageinfo
index ed9885d37..9bf47b655 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/packageinfo
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/packageinfo
@@ -1 +1 @@
-version 1.8
+version 1.9
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleCapability.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleCapability.java
index 834fb5779..b4eb0df09 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleCapability.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleCapability.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2010, 2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2010, 2015). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -43,6 +43,7 @@ public interface BundleCapability extends Capability {
*
* @return The namespace of this capability.
*/
+ @Override
String getNamespace();
/**
@@ -57,6 +58,7 @@ public interface BundleCapability extends Capability {
* this capability, or an empty map if this capability has no
* directives.
*/
+ @Override
Map<String, String> getDirectives();
/**
@@ -66,6 +68,7 @@ public interface BundleCapability extends Capability {
* this capability, or an empty map if this capability has no
* attributes.
*/
+ @Override
Map<String, Object> getAttributes();
/**
@@ -77,5 +80,6 @@ public interface BundleCapability extends Capability {
* @return The resource declaring this capability.
* @since 1.1
*/
+ @Override
BundleRevision getResource();
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRequirement.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRequirement.java
index ac0578af5..f7e73311c 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRequirement.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRequirement.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2010, 2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2010, 2015). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -54,6 +54,7 @@ public interface BundleRequirement extends Requirement {
*
* @return The namespace of this requirement.
*/
+ @Override
String getNamespace();
/**
@@ -68,6 +69,7 @@ public interface BundleRequirement extends Requirement {
* this requirement, or an empty map if this requirement has no
* directives.
*/
+ @Override
Map<String, String> getDirectives();
/**
@@ -81,6 +83,7 @@ public interface BundleRequirement extends Requirement {
* this requirement, or an empty map if this requirement has no
* attributes.
*/
+ @Override
Map<String, Object> getAttributes();
/**
@@ -93,5 +96,6 @@ public interface BundleRequirement extends Requirement {
* if this requirement is synthesized.
* @since 1.1
*/
+ @Override
BundleRevision getResource();
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRevision.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRevision.java
index 1f318afdf..814d8d4db 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRevision.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRevision.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2010, 2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2010, 2015). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -283,6 +283,7 @@ public interface BundleRevision extends BundleReference, Resource {
* namespace.
* @since 1.1
*/
+ @Override
List<Capability> getCapabilities(String namespace);
/**
@@ -301,5 +302,6 @@ public interface BundleRevision extends BundleReference, Resource {
* namespace.
* @since 1.1
*/
+ @Override
List<Requirement> getRequirements(String namespace);
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWire.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWire.java
index f51255c85..9877055d8 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWire.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWire.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2011, 2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2011, 2015). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -32,6 +32,7 @@ public interface BundleWire extends Wire {
*
* @return The {@link BundleCapability} for this wire.
*/
+ @Override
BundleCapability getCapability();
/**
@@ -39,6 +40,7 @@ public interface BundleWire extends Wire {
*
* @return The {@link BundleRequirement} for this wire.
*/
+ @Override
BundleRequirement getRequirement();
/**
@@ -87,6 +89,7 @@ public interface BundleWire extends Wire {
* @return The resource providing the capability.
* @since 1.1
*/
+ @Override
BundleRevision getProvider();
/**
@@ -104,6 +107,6 @@ public interface BundleWire extends Wire {
* @return The resource who requires the capability.
* @since 1.1
*/
+ @Override
BundleRevision getRequirer();
-
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWiring.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWiring.java
index 367499c4b..ddad9df28 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWiring.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWiring.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2010, 2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2010, 2016). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,6 +19,7 @@ package org.osgi.framework.wiring;
import java.net.URL;
import java.util.Collection;
import java.util.List;
+
import org.osgi.annotation.versioning.ProviderType;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleReference;
@@ -124,22 +125,20 @@ public interface BundleWiring extends BundleReference, Wiring {
/**
* Returns the requirements of this bundle wiring.
- *
* <p>
* Only requirements considered by the resolver are returned. For example,
* requirements with {@link Namespace#REQUIREMENT_EFFECTIVE_DIRECTIVE
* effective} directive not equal to {@link Namespace#EFFECTIVE_RESOLVE
* resolve} are not returned.
- *
* <p>
* A bundle wiring for a non-fragment revision has a subset of the declared
* requirements from the bundle revision and all attached fragment
* revisions. Not all declared requirements may be present since some may be
- * discarded. For example, if a package is declared to be optionally
- * imported and is not actually imported, the requirement must be discarded.
+ * discarded. For example, if a package is declared to be both exported and
+ * imported, only one is selected and the other is discarded.
*
* @param namespace The namespace of the requirements to return or
- * {@code null} to return the requirements from all namespaces.
+ * {@code null} to return the requirements from all namespaces.
* @return A list containing a snapshot of the {@link BundleRequirement}s,
* or an empty list if this bundle wiring uses no requirements in
* the specified namespace. If this bundle wiring is not
@@ -414,6 +413,7 @@ public interface BundleWiring extends BundleReference, Wiring {
* ordering defined between capabilities in different namespaces.
* @since 1.1
*/
+ @Override
List<Capability> getResourceCapabilities(String namespace);
/**
@@ -446,6 +446,7 @@ public interface BundleWiring extends BundleReference, Wiring {
* between requirements in different namespaces.
* @since 1.1
*/
+ @Override
List<Requirement> getResourceRequirements(String namespace);
/**
@@ -468,6 +469,7 @@ public interface BundleWiring extends BundleReference, Wiring {
* capabilities in different namespaces.
* @since 1.1
*/
+ @Override
List<Wire> getProvidedResourceWires(String namespace);
/**
@@ -490,6 +492,7 @@ public interface BundleWiring extends BundleReference, Wiring {
* requirements in different namespaces.
* @since 1.1
*/
+ @Override
List<Wire> getRequiredResourceWires(String namespace);
/**
@@ -501,5 +504,6 @@ public interface BundleWiring extends BundleReference, Wiring {
* @return The resource associated with this wiring.
* @since 1.1
*/
+ @Override
BundleRevision getResource();
}

Back to the top