Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2017-06-19 10:52:18 -0400
committerThomas Watson2017-06-19 10:52:54 -0400
commit1209e11363b68211353c2a8d20579913fba88622 (patch)
tree1cb9419fbb138a1c3dbf73d5d20ce7f872749452
parent75f388643bc5d31e94db978b3184cca3cf800bd2 (diff)
downloadrt.equinox.framework-I20170619-2000.tar.gz
rt.equinox.framework-I20170619-2000.tar.xz
rt.equinox.framework-I20170619-2000.zip
Bug 518433 - Tons of exceptions on Exit:I20170619-2000
java.lang.IllegalArgumentException: The service parameter was not provided by this object Change-Id: I34b20f8f522d59b6dd893a1f3d0e686a296d05e4 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/util/tracker/ServiceTracker.java18
1 files changed, 7 insertions, 11 deletions
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/util/tracker/ServiceTracker.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/util/tracker/ServiceTracker.java
index e9b984434..7687fb89f 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/util/tracker/ServiceTracker.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/util/tracker/ServiceTracker.java
@@ -394,10 +394,9 @@ public class ServiceTracker<S, T> implements ServiceTrackerCustomizer<S, T> {
* This method is only called when this {@code ServiceTracker} has been
* constructed with a {@code null ServiceTrackerCustomizer} argument.
* <p>
- * This implementation returns the result of calling
- * {@code getServiceObjects(reference).getService()} on the
- * {@code BundleContext} with which this {@code ServiceTracker} was created
- * passing the specified {@code ServiceReference}.
+ * This implementation returns the result of calling {@code getService} on
+ * the {@code BundleContext} with which this {@code ServiceTracker} was
+ * created passing the specified {@code ServiceReference}.
* <p>
* This method can be overridden in a subclass to customize the service
* object to be tracked for the service being added. In that case, take care
@@ -414,7 +413,7 @@ public class ServiceTracker<S, T> implements ServiceTrackerCustomizer<S, T> {
@Override
public T addingService(ServiceReference<S> reference) {
@SuppressWarnings("unchecked")
- T result = (T) context.getServiceObjects(reference).getService();
+ T result = (T) context.getService(reference);
return result;
}
@@ -445,10 +444,9 @@ public class ServiceTracker<S, T> implements ServiceTrackerCustomizer<S, T> {
* This method is only called when this {@code ServiceTracker} has been
* constructed with a {@code null ServiceTrackerCustomizer} argument.
* <p>
- * This implementation calls
- * {@code getServiceObjects(reference).ungetService(service)}, on the
+ * This implementation calls {@code ungetService}, on the
* {@code BundleContext} with which this {@code ServiceTracker} was created,
- * passing the specified {@code ServiceReference} and service.
+ * passing the specified {@code ServiceReference}.
* <p>
* This method can be overridden in a subclass. If the default
* implementation of {@link #addingService(ServiceReference) addingService}
@@ -460,9 +458,7 @@ public class ServiceTracker<S, T> implements ServiceTrackerCustomizer<S, T> {
*/
@Override
public void removedService(ServiceReference<S> reference, T service) {
- @SuppressWarnings("unchecked")
- S s = (S) service;
- context.getServiceObjects(reference).ungetService(s);
+ context.ungetService(reference);
}
/**

Back to the top