diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-03-11 00:18:58 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-03-11 00:18:58 +0000 |
commit | fcf0272f95f1bb1bd0901c071f2100c0929596eb (patch) | |
tree | 9fdbefd5638f3b391b5a8248e99723ec7a00487e | |
parent | d2a17c57a7e1b6b8fef7a3eba36686c5afffcc13 (diff) |
Avoid NPE if the extensibility-equinox bundle is not present
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@752314 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java b/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java index 7cc103a687..c1c15db1c7 100644 --- a/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java +++ b/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java @@ -294,13 +294,15 @@ public class EquinoxHost { // Start the extensiblity and launcher bundles String extensibilityBundleName = "org.apache.tuscany.sca.extensibility.equinox"; Bundle extensibilityBundle = allBundles.get(extensibilityBundleName); - if ((extensibilityBundle.getState() & Bundle.ACTIVE) == 0) { - if (logger.isLoggable(Level.FINE)) { - logger.fine("Starting bundle: " + string(extensibilityBundle, false)); + if (extensibilityBundle != null) { + if ((extensibilityBundle.getState() & Bundle.ACTIVE) == 0) { + if (logger.isLoggable(Level.FINE)) { + logger.fine("Starting bundle: " + string(extensibilityBundle, false)); + } + extensibilityBundle.start(); + } else if (logger.isLoggable(Level.FINE)) { + logger.fine("Bundle is already started: " + string(extensibilityBundle, false)); } - extensibilityBundle.start(); - } else if (logger.isLoggable(Level.FINE)) { - logger.fine("Bundle is already started: " + string(extensibilityBundle, false)); } if ((launcherBundle.getState() & Bundle.ACTIVE) == 0) { if (logger.isLoggable(Level.FINE)) { |