X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ECOMP-PAP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fpolicy%2Fpap%2Fxacml%2Frest%2Fcontroller%2FMicroServiceDictionaryController.java;h=ecf84620e8a72a88991914b0a768d9854fa22d8c;hb=685ed1545ed28b777a3ba6e7d315b78f355154cb;hp=108d33c25e28d9898c137b3189d8a0fae3f5cb24;hpb=fc5c07705edc4dcb7083b39116a43844bb6a1490;p=policy%2Fengine.git diff --git a/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/MicroServiceDictionaryController.java b/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/MicroServiceDictionaryController.java index 108d33c25..ecf84620e 100644 --- a/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/MicroServiceDictionaryController.java +++ b/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/MicroServiceDictionaryController.java @@ -1013,14 +1013,14 @@ public class MicroServiceDictionaryController { if (mainClass != null && mainClass.getDependency()==null){ mainClass.setDependency(""); } - - this.newModel.setDependency(mainClass.getDependency()); - this.newModel.setSub_attributes(subAttribute.toString()); - this.newModel.setAttributes(mainClass.getAttribute().toString().replace("{", "").replace("}", "")); - this.newModel.setRef_attributes(mainClass.getRefAttribute().toString().replace("{", "").replace("}", "")); - this.newModel.setEnumValues(mainClass.getEnumType().toString().replace("{", "").replace("}", "")); - this.newModel.setAnnotation(mainClass.getMatchingSet().toString().replace("{", "").replace("}", "")); - + if(mainClass != null){ + this.newModel.setDependency(mainClass.getDependency()); + this.newModel.setSub_attributes(subAttribute); + this.newModel.setAttributes(mainClass.getAttribute().toString().replace("{", "").replace("}", "")); + this.newModel.setRef_attributes(mainClass.getRefAttribute().toString().replace("{", "").replace("}", "")); + this.newModel.setEnumValues(mainClass.getEnumType().toString().replace("{", "").replace("}", "")); + this.newModel.setAnnotation(mainClass.getMatchingSet().toString().replace("{", "").replace("}", "")); + } } private ArrayList getFullDependencyList(ArrayList dependency) {