Sonar Major 07/35107/2
authorSP00501638 <SP00501638@techmahindra.com>
Tue, 13 Mar 2018 05:52:15 +0000 (11:22 +0530)
committerSP00501638 <SP00501638@techmahindra.com>
Tue, 13 Mar 2018 05:52:36 +0000 (11:22 +0530)
Merge this if statement with the enclosing one
CreateBrmsParamPolicy.java:L218

Sonar Link:
hhttps://sonar.onap.org/project/issues?id=org.onap.policy.engine%3APolicyEngineSuite&myIssues=true&open=AV2blOqK5bp_wwmIUQqX&resolved=false&severities=MAJOR

Location:
ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/CreateBrmsParamPolicy.java

Change-Id: I0f9885a2491735878d688a2c812afd15a052f481
Issue-ID: POLICY-686
Signed-off-by: SP00501638 <SP00501638@techmahindra.com>
ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/CreateBrmsParamPolicy.java

index 4de65fd..2a13fb0 100644 (file)
@@ -214,10 +214,8 @@ public class CreateBrmsParamPolicy extends Policy {
                                                comment = true;
                                                continue;
                                        }
-                                       if (line.contains("//")) {
-                                               if(!(line.contains("http://") || line.contains("https://"))){
+                                       if (line.contains("//") && !(line.contains("http://") || line.contains("https://"))){
                                                        line = line.split("\\/\\/")[0];
-                                               }
                                        }
                                        if (line.contains("/*")) {
                                                comment = true;