From 3105cfbfb817444ebbfec8a726b8526e7ff38632 Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Mon, 2 Dec 2019 14:38:05 -0500 Subject: Clear some simple xacml sonar Missing assertions in JUnit test cases. Use replace vs replaceAll Swapping arguments Issue-ID: POLICY-2079 Change-Id: I5accd462eab3d4f6b3321e375d4ba1084caf4b8c Signed-off-by: Pamela Dragosh --- .../xacml/pdp/application/guard/CoordinationGuardTranslator.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'applications/guard/src/main/java') diff --git a/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/CoordinationGuardTranslator.java b/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/CoordinationGuardTranslator.java index eb793f69..eb86486d 100644 --- a/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/CoordinationGuardTranslator.java +++ b/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/CoordinationGuardTranslator.java @@ -151,9 +151,9 @@ public class CoordinationGuardTranslator implements ToscaPolicyTranslator { * Replace function placeholders with appropriate values */ try (Stream stream = Files.lines(Paths.get(xacmlProtoFilename))) { - return stream.map(s -> s.replaceAll("UNIQUE_ID", uniqueId)) - .map(s -> s.replaceAll("CONTROL_LOOP_ONE", cLOne)) - .map(s -> s.replaceAll("CONTROL_LOOP_TWO", cLTwo)) + return stream.map(s -> s.replace("UNIQUE_ID", uniqueId)) + .map(s -> s.replace("CONTROL_LOOP_ONE", cLOne)) + .map(s -> s.replace("CONTROL_LOOP_TWO", cLTwo)) .collect(Collectors.joining(XacmlPolicyUtils.LINE_SEPARATOR)); } catch (IOException e) { throw new -- cgit 1.2.3-korg