diff options
author | Jim Hahn <jrh3@att.com> | 2020-03-12 15:16:44 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2020-03-13 09:27:55 -0400 |
commit | 7f6929e5ea6da4015090b3adac73b35f9b3afb18 (patch) | |
tree | e1321bf17bfc7cd6f2231088b8a1d8b3d7b790e3 /controlloop/common/coordination/src/main | |
parent | aa8225b5211485b3c1150c21e51fd3e93b7f31d3 (diff) |
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 <jrh3@att.com>
Change-Id: I10b40c1e5af62308f2e4c315e4d399aafff2998f
Diffstat (limited to 'controlloop/common/coordination/src/main')
-rw-r--r-- | controlloop/common/coordination/src/main/java/org/onap/policy/coordination/Util.java | 10 |
1 files changed, 5 insertions, 5 deletions
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<String> 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); |