Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2013-02-19 17:59:09 -0500
committerIgor Fedorenko2013-02-20 07:27:43 -0500
commit05acb2b44576d73ed007adc3e81817baac224a8d (patch)
tree60e7db23e9a3e4962a18b1d241fe9c7ed0df50b4
parentaa98096a536c374f9815009c942de891d04c63c6 (diff)
downloadm2e-core-05acb2b44576d73ed007adc3e81817baac224a8d.tar.gz
m2e-core-05acb2b44576d73ed007adc3e81817baac224a8d.tar.xz
m2e-core-05acb2b44576d73ed007adc3e81817baac224a8d.zip
guard against NPE when no default lifecyclemapping bundle
Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/LifecycleMappingFactory.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/LifecycleMappingFactory.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/LifecycleMappingFactory.java
index e67635b3..c52fea82 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/LifecycleMappingFactory.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/LifecycleMappingFactory.java
@@ -1071,6 +1071,9 @@ public class LifecycleMappingFactory {
if(defaultLifecycleMappingMetadataSource == null) {
Bundle bundle = Platform.getBundle(DEFAULT_LIFECYCLE_METADATA_BUNDLE);
defaultLifecycleMappingMetadataSource = getMetadataSource(bundle);
+ if(defaultLifecycleMappingMetadataSource == null) {
+ defaultLifecycleMappingMetadataSource = new LifecycleMappingMetadataSource();
+ }
defaultLifecycleMappingMetadataSource.setSource("default");
}
return defaultLifecycleMappingMetadataSource;

Back to the top