From fd62fcfdf1bb55a9ece78b356c04359883072ee7 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Tue, 30 Jun 2020 07:23:40 -0400 Subject: Fix more sonars in xacml-pdp Somehow missed this sonar issue in one line of code: - invoke only one method in a junit lambda Issue-ID: POLICY-2681 Change-Id: I03a6708e0d3ed2a43577a63d0f3cdfc9bd76c8d8 Signed-off-by: Jim Hahn --- .../policy/pdp/xacml/application/common/XacmlPolicyUtilsTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'applications/common/src/test/java') diff --git a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/XacmlPolicyUtilsTest.java b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/XacmlPolicyUtilsTest.java index d3aba91f..9ff81423 100644 --- a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/XacmlPolicyUtilsTest.java +++ b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/XacmlPolicyUtilsTest.java @@ -211,9 +211,10 @@ public class XacmlPolicyUtilsTest { assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() -> XacmlPolicyUtils.writePolicyFile(fileTemp, "not a policy") ); + + Path rootPath = policyFolder.getRoot().toPath(); assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() -> - XacmlPolicyUtils.constructUniquePolicyFilename("not a policy", - policyFolder.getRoot().toPath()) + XacmlPolicyUtils.constructUniquePolicyFilename("not a policy", rootPath) ); } -- cgit 1.2.3-korg