X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=POLICY-SDK-APP%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fcontroller%2FCreateBRMSRawController.java;h=3ab4f4f16c3206392c655fb9df944971a055169a;hb=cac5ee759fee5db51a32838c7e25b878468a27e0;hp=b08761b84a929ba690fca293838dfd2c0c465372;hpb=84b95a134c61217667b7eb7b7e774a485d2406ba;p=policy%2Fengine.git diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateBRMSRawController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateBRMSRawController.java index b08761b84..3ab4f4f16 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateBRMSRawController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateBRMSRawController.java @@ -57,7 +57,7 @@ public class CreateBRMSRawController{ @SuppressWarnings("unchecked") public void prePopulateBRMSRawPolicyData(PolicyRestAdapter policyAdapter, PolicyEntity entity) { - attributeList = new ArrayList(); + attributeList = new ArrayList<>(); if (policyAdapter.getPolicyData() instanceof PolicyType) { PolicyType policy = (PolicyType) policyAdapter.getPolicyData(); policyAdapter.setOldPolicyFileName(policyAdapter.getPolicyName()); @@ -89,7 +89,7 @@ public class CreateBRMSRawController{ attribute.put("value", value); attributeList.add(attribute); }else if(attributeAssignment.getAttributeId().startsWith("dependencies:")){ - ArrayList dependencies = new ArrayList(Arrays.asList(attributeAssignment.getAttributeId().replace("dependencies:", "").split(","))); + ArrayList dependencies = new ArrayList<>(Arrays.asList(attributeAssignment.getAttributeId().replace("dependencies:", "").split(","))); if(dependencies.contains("")){ dependencies.remove(""); } @@ -131,16 +131,16 @@ public class CreateBRMSRawController{ AttributeDesignatorType designator = match.getAttributeDesignator(); String attributeId = designator.getAttributeId(); - if (attributeId.equals("RiskType")){ + if ("RiskType".equals(attributeId)){ policyAdapter.setRiskType(value); } - if (attributeId.equals("RiskLevel")){ + if ("RiskLevel".equals(attributeId)){ policyAdapter.setRiskLevel(value); } - if (attributeId.equals("guard")){ + if ("guard".equals(attributeId)){ policyAdapter.setGuard(value); } - if (attributeId.equals("TTLDate") && !value.contains("NA")){ + if ("TTLDate".equals(attributeId) && !value.contains("NA")){ PolicyController controller = new PolicyController(); String newDate = controller.convertDate(value); policyAdapter.setTtlDate(newDate);