From 7f6929e5ea6da4015090b3adac73b35f9b3afb18 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Thu, 12 Mar 2020 15:16:44 -0400 Subject: Fix sonar issues in drools-applications Fixed various sonar issues, including moving some code to policy-common. Fixed some eclipse warnings, including deprecated junit APIs. Issue-ID: POLICY-2426 Signed-off-by: Jim Hahn Change-Id: I10b40c1e5af62308f2e4c315e4d399aafff2998f --- .../src/main/java/org/onap/policy/coordination/Util.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'controlloop/common/coordination/src/main/java') diff --git a/controlloop/common/coordination/src/main/java/org/onap/policy/coordination/Util.java b/controlloop/common/coordination/src/main/java/org/onap/policy/coordination/Util.java index 12b361f9f..a47854736 100644 --- a/controlloop/common/coordination/src/main/java/org/onap/policy/coordination/Util.java +++ b/controlloop/common/coordination/src/main/java/org/onap/policy/coordination/Util.java @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * controlloop + * ONAP * ================================================================================ - * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2019-2020 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. @@ -95,9 +95,9 @@ public final class Util { */ String xacmlPolicy = null; try (Stream stream = Files.lines(Paths.get(xacmlProtoFilename))) { - xacmlPolicy = stream.map(s -> s.replaceAll("UNIQUE_ID", uniqueId)) - .map(s -> s.replaceAll("CONTROL_LOOP_ONE", cLOne)) - .map(s -> s.replaceAll("CONTROL_LOOP_TWO", cLTwo)) + xacmlPolicy = 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(System.lineSeparator())); } catch (IOException e) { logger.error("Error while generating XACML policy for coordination directive", e); -- cgit 1.2.3-korg