From: Jim Hahn Date: Tue, 30 Jun 2020 11:23:40 +0000 (-0400) Subject: Fix more sonars in xacml-pdp X-Git-Tag: 2.3.0~5 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=fd62fcfdf1bb55a9ece78b356c04359883072ee7;p=policy%2Fxacml-pdp.git 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 --- 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) ); }