Fixed major sonar issue in PolicySequence 79/72779/1
authorezhil <ezhrajam@in.ibm.com>
Thu, 15 Nov 2018 13:38:43 +0000 (19:08 +0530)
committerezhil <ezhrajam@in.ibm.com>
Thu, 15 Nov 2018 13:38:59 +0000 (19:08 +0530)
Fixed variable hide issue
Issue-ID: CCSDK-687
Change-Id: I20fbfdd30f76bc55463c9b49fe3ac05dfe8c9f50
Signed-off-by: ezhil <ezhrajam@in.ibm.com>
ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/policy/PolicySequence.java

index dc0b6fd..526f67c 100644 (file)
@@ -83,11 +83,11 @@ public class PolicySequence {
                 }
             }
             if (this.maxValue == null) {
-                long length = this.length;
-                if (length <= 0) {
-                    length = 3;
+                long mlength = this.length;
+                if (mlength <= 0) {
+                    mlength = 3;
                 }
-                this.maxValue = (long) Math.pow(base, length) - 1;
+                this.maxValue = (long) Math.pow(base, mlength) - 1;
             }
         }
         return maxValue;