summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Liebig2008-02-12 08:10:40 (EST)
committerStefan Liebig2008-02-12 08:10:40 (EST)
commitb8dfdfe81532a22d064ce8c13f24e5164620ae06 (patch)
tree0a261bb5f64f219b32b014943e9a8bf54f420dbb
parentaf3ae7d5308b62ca262f7fcf9daf933d190e5295 (diff)
downloadorg.eclipse.riena-b8dfdfe81532a22d064ce8c13f24e5164620ae06.zip
org.eclipse.riena-b8dfdfe81532a22d064ce8c13f24e5164620ae06.tar.gz
org.eclipse.riena-b8dfdfe81532a22d064ce8c13f24e5164620ae06.tar.bz2
nulled a few references on stop + typo
-rw-r--r--org.eclipse.riena.core/src/org/eclipse/riena/core/service/Injector.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/org.eclipse.riena.core/src/org/eclipse/riena/core/service/Injector.java b/org.eclipse.riena.core/src/org/eclipse/riena/core/service/Injector.java
index e450e07..15846b9 100644
--- a/org.eclipse.riena.core/src/org/eclipse/riena/core/service/Injector.java
+++ b/org.eclipse.riena.core/src/org/eclipse/riena/core/service/Injector.java
@@ -44,7 +44,7 @@ public class Injector {
private boolean started = false;
private BundleContext context = null;
private List<ServiceReference> trackedServiceRefs = null;
- private ServiceListener serviceListner;
+ private ServiceListener serviceListener;
private RuntimeException lastError;
@@ -81,7 +81,7 @@ public class Injector {
if (unbindMethodName == null)
unbindMethodName = DEFAULT_UNBIND_METHOD_NAME;
assertMethod("Unbind method", unbindMethodName);
- serviceListner = new InjectorServiceListener();
+ serviceListener = new InjectorServiceListener();
trackedServiceRefs = new ArrayList<ServiceReference>(1);
start();
if (lastError != null)
@@ -95,7 +95,7 @@ public class Injector {
public void stop() {
if (!started)
return;
- context.removeServiceListener(serviceListner);
+ context.removeServiceListener(serviceListener);
// copy list to array so that I iterate through array and still
// remove entries from List concurrently
@@ -105,6 +105,8 @@ public class Injector {
}
for (ServiceReference serviceRef : serviceRefs)
unbind(serviceRef);
+ serviceListener = null;
+ trackedServiceRefs = null;
started = false;
}
@@ -172,7 +174,7 @@ public class Injector {
// register the service listener before we go through the reference
// list since its very more likely that no service is registered
// between getServiceReferences and addServiceListener
- context.addServiceListener(serviceListner, serviceId.getFilter());
+ context.addServiceListener(serviceListener, serviceId.getFilter());
// then go through the list of references
if (serviceRefs != null)
for (ServiceReference serviceRef : serviceRefs)