Address sonar issues in models
[policy/models.git] / models-tosca / src / main / java / org / onap / policy / models / tosca / simple / concepts / JpaToscaPolicy.java
index cebf63d..1f5c76e 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP Policy Model
  * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
  * Modifications Copyright (C) 2019-2020 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -274,7 +274,7 @@ public class JpaToscaPolicy extends JpaToscaEntityType<ToscaPolicy> implements P
         }
 
         if (properties != null) {
-            result = validateProperties(result);
+            validateProperties(result);
         }
 
         if (targets != null) {
@@ -287,11 +287,9 @@ public class JpaToscaPolicy extends JpaToscaEntityType<ToscaPolicy> implements P
     /**
      * Validate the policy properties.
      *
-     * @param result The result of validations up to now
-     * @return the validation result
+     * @param result where to put the validation results
      */
-    private PfValidationResult validateProperties(final PfValidationResult resultIn) {
-        PfValidationResult result = resultIn;
+    private void validateProperties(final PfValidationResult result) {
 
         for (Entry<String, String> propertyEntry : properties.entrySet()) {
             if (!ParameterValidationUtils.validateStringParameter(propertyEntry.getKey())) {
@@ -302,7 +300,6 @@ public class JpaToscaPolicy extends JpaToscaEntityType<ToscaPolicy> implements P
                         "policy property value may not be null "));
             }
         }
-        return result;
     }
 
     /**