[POLICY-122] Policy GUI Fixes
[policy/engine.git] / POLICY-SDK-APP / src / main / java / org / openecomp / policy / controller / CreateBRMSRawController.java
index b31f702..c5b97ad 100644 (file)
@@ -72,6 +72,7 @@ public class CreateBRMSRawController{
                        try{
                                description = policy.getDescription().substring(0, policy.getDescription().indexOf("@CreatedBy:"));
                        }catch(Exception e){
+                               logger.info("Not able to see the createdby in description. So, add generic description", e);
                                description = policy.getDescription();
                        }
                        policyAdapter.setPolicyDescription(description);
@@ -80,7 +81,7 @@ public class CreateBRMSRawController{
                        for( AdviceExpressionType adviceExpression: expressionTypes.getAdviceExpression()){
                                for(AttributeAssignmentExpressionType attributeAssignment: adviceExpression.getAttributeAssignmentExpression()){
                                        if(attributeAssignment.getAttributeId().startsWith("key:")){
-                                               Map<String, String> attribute = new HashMap<String, String>();
+                                               Map<String, String> attribute = new HashMap<>();
                                                String key = attributeAssignment.getAttributeId().replace("key:", "");
                                                attribute.put("key", key);
                                                JAXBElement<AttributeValueType> attributevalue = (JAXBElement<AttributeValueType>) attributeAssignment.getExpression();