Fix sonars in xacml-pdp
[policy/xacml-pdp.git] / applications / common / src / main / java / org / onap / policy / pdp / xacml / application / common / OnapObligation.java
index c1a949f..4febd21 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP
  * ================================================================================
- * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -129,7 +129,7 @@ public class OnapObligation {
         //
         // Create an ObligationExpression
         //
-        ObligationExpressionType obligation = new ObligationExpressionType();
+        var obligation = new ObligationExpressionType();
         obligation.setFulfillOn(effectType);
         obligation.setObligationId(obligationId.stringValue());
         //
@@ -238,14 +238,14 @@ public class OnapObligation {
         //
         // Create an AttributeValue for it
         //
-        AttributeValueType value = new AttributeValueType();
+        var value = new AttributeValueType();
         value.setDataType(datatype.stringValue());
         value.getContent().add(theValue.toString());
         //
         // Create our AttributeAssignmentExpression where we will
         // store the contents of the policy id.
         //
-        AttributeAssignmentExpressionType expressionType = new AttributeAssignmentExpressionType();
+        var expressionType = new AttributeAssignmentExpressionType();
         expressionType.setAttributeId(id.stringValue());
         expressionType.setCategory(category.stringValue());
         expressionType.setExpression(factory.createAttributeValue(value));