From c19f81387f4efc666cfa45b000275f3ee7c1d9d1 Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Mon, 16 Sep 2019 13:09:46 -0400 Subject: Sonar xacml-pdp issues Either log or re-throw exception Refactor to not nest more than 3 statements Refactor to throw at most one exception Move variable to comply with Java Code conventions String literal on LHS Issue-ID: POLICY-2079 Change-Id: Iac33623ef4694cf38c4a69c8f0b9040d8439998e Signed-off-by: Pamela Dragosh --- .../xacml/application/common/std/StdMatchablePolicyRequestTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'applications/common/src/test') diff --git a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchablePolicyRequestTest.java b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchablePolicyRequestTest.java index 1c844621..d3e362c1 100644 --- a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchablePolicyRequestTest.java +++ b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchablePolicyRequestTest.java @@ -24,7 +24,6 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.when; -import com.att.research.xacml.api.DataTypeException; import com.att.research.xacml.api.Request; import com.att.research.xacml.api.RequestAttributes; import com.att.research.xacml.api.XACML3; @@ -39,6 +38,7 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.onap.policy.models.decisions.concepts.DecisionRequest; import org.onap.policy.pdp.xacml.application.common.ToscaDictionary; +import org.onap.policy.pdp.xacml.application.common.XacmlApplicationException; public class StdMatchablePolicyRequestTest { private static final String ACTION = "my-action"; @@ -74,7 +74,7 @@ public class StdMatchablePolicyRequestTest { } @Test - public void testCreateInstance() throws IllegalAccessException, DataTypeException { + public void testCreateInstance() throws XacmlApplicationException { resources.put("resource1", RESOURCE1); resources.put("resource2", RESOURCE2); resources.put("resource3", Arrays.asList(RESOURCE3, RESOURCE4)); -- cgit 1.2.3-korg