summaryrefslogtreecommitdiffstats
path: root/applications
diff options
context:
space:
mode:
Diffstat (limited to 'applications')
-rw-r--r--applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/operationshistory/CountRecentOperationsPipTest.java5
-rw-r--r--applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/CoordinationGuardTranslator.java6
2 files changed, 7 insertions, 4 deletions
diff --git a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/operationshistory/CountRecentOperationsPipTest.java b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/operationshistory/CountRecentOperationsPipTest.java
index b01fa708..ac8a0c29 100644
--- a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/operationshistory/CountRecentOperationsPipTest.java
+++ b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/operationshistory/CountRecentOperationsPipTest.java
@@ -18,6 +18,7 @@
package org.onap.policy.pdp.xacml.application.common.operationshistory;
+import static org.assertj.core.api.Assertions.assertThatCode;
import static org.junit.Assert.assertEquals;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
@@ -167,7 +168,9 @@ public class CountRecentOperationsPipTest {
@Test
public void testConfigure_DbException() throws Exception {
properties.put("javax.persistence.jdbc.url", "invalid");
- pipEngine.configure("issuer", properties);
+ assertThatCode(() ->
+ pipEngine.configure("issuer", properties)
+ ).doesNotThrowAnyException();
}
@Test
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<String> 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