summaryrefslogtreecommitdiffstats
path: root/appc-dg/appc-dg-shared/appc-dg-dependency-model
diff options
context:
space:
mode:
Diffstat (limited to 'appc-dg/appc-dg-shared/appc-dg-dependency-model')
-rw-r--r--appc-dg/appc-dg-shared/appc-dg-dependency-model/src/main/java/org/onap/appc/dg/dependencymanager/impl/DependencyManagerImpl.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/appc-dg/appc-dg-shared/appc-dg-dependency-model/src/main/java/org/onap/appc/dg/dependencymanager/impl/DependencyManagerImpl.java b/appc-dg/appc-dg-shared/appc-dg-dependency-model/src/main/java/org/onap/appc/dg/dependencymanager/impl/DependencyManagerImpl.java
index 82891b02d..ecd3c0305 100644
--- a/appc-dg/appc-dg-shared/appc-dg-dependency-model/src/main/java/org/onap/appc/dg/dependencymanager/impl/DependencyManagerImpl.java
+++ b/appc-dg/appc-dg-shared/appc-dg-dependency-model/src/main/java/org/onap/appc/dg/dependencymanager/impl/DependencyManagerImpl.java
@@ -55,6 +55,11 @@ public class DependencyManagerImpl implements DependencyManager {
if(dependencyModel == null){
logger.debug("Dependency model not found in cache, creating strategy for reading it");
DependencyType strategy = getStrategy(dependencyType);
+ // Throw exception if strategy could not be created because it is required
+ // to retrieve the vnfc dependency model later
+ if (strategy == null) {
+ throw new NullPointerException("Strategy is null. Failed to retrieve Vnfc Dependency Model");
+ }
dependencyModel = strategy.getVnfcDependencyModel(modelIdentifier);
}
if (logger.isTraceEnabled()) {