aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Clemons2012-11-28 10:39:18 (EST)
committerGlyn Normington2012-11-28 10:39:18 (EST)
commit1b8cf3a31c90a753c062a8f4278fd11346e61aea (patch)
tree09177cedbc0351dafb35c738bcb32417bba96a76
parent163a4948a546ca9522a012141163757590208036 (diff)
downloadorg.eclipse.gemini.blueprint-1b8cf3a31c90a753c062a8f4278fd11346e61aea.zip
org.eclipse.gemini.blueprint-1b8cf3a31c90a753c062a8f4278fd11346e61aea.tar.gz
org.eclipse.gemini.blueprint-1b8cf3a31c90a753c062a8f4278fd11346e61aea.tar.bz2
374717: guard against NPE
-rw-r--r--core/src/main/java/org/eclipse/gemini/blueprint/service/exporter/support/internal/support/LazyTargetResolver.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/src/main/java/org/eclipse/gemini/blueprint/service/exporter/support/internal/support/LazyTargetResolver.java b/core/src/main/java/org/eclipse/gemini/blueprint/service/exporter/support/internal/support/LazyTargetResolver.java
index 9bd13b5..c1248f7 100644
--- a/core/src/main/java/org/eclipse/gemini/blueprint/service/exporter/support/internal/support/LazyTargetResolver.java
+++ b/core/src/main/java/org/eclipse/gemini/blueprint/service/exporter/support/internal/support/LazyTargetResolver.java
@@ -48,7 +48,7 @@ public class LazyTargetResolver implements UnregistrationNotifier {
}
public void activate() {
- if (activated.compareAndSet(false, true)) {
+ if (activated.compareAndSet(false, true) && notifier != null) {
// no service registered
if (decorator == null) {
notifier.callUnregister(null, null);
@@ -92,7 +92,7 @@ public class LazyTargetResolver implements UnregistrationNotifier {
}
public void unregister(Map properties) {
- if (activated.get()) {
+ if (activated.get() && notifier != null) {
Object target = getBeanIfPossible();
notifier.callUnregister(target, properties);
}
@@ -119,4 +119,5 @@ public class LazyTargetResolver implements UnregistrationNotifier {
notifier.callUnregister(null, null);
}
}
-} \ No newline at end of file
+}
+