From 1bedb591cc68c10c7db916fda8a3f02d67c2314d Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Sun, 3 Nov 2019 17:42:09 -0500 Subject: More examples of optimization policies and cleanup Fixed a couple of sonar issues - log exception and do not nest more 3 if-else-try. Cleaned up the JUnit test to make debugging a bit easier. Added more examples for testing optimization tests. Moved the target back into the Policy and kept the Condition on the Rule. Works exactly the same, just a bit cleaner and one less rule to deal with. Issue-ID: POLICY-2066 Change-Id: Ife28dc2ce959dcf1fb8ca72061ebc5dca862a7f4 Signed-off-by: Pamela Dragosh --- .../src/main/java/org/onap/policy/pdp/xacml/xacmltest/TestUtils.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'xacml-test/src/main/java') diff --git a/xacml-test/src/main/java/org/onap/policy/pdp/xacml/xacmltest/TestUtils.java b/xacml-test/src/main/java/org/onap/policy/pdp/xacml/xacmltest/TestUtils.java index 16bea1d1..70f9ebc0 100644 --- a/xacml-test/src/main/java/org/onap/policy/pdp/xacml/xacmltest/TestUtils.java +++ b/xacml-test/src/main/java/org/onap/policy/pdp/xacml/xacmltest/TestUtils.java @@ -69,8 +69,7 @@ public class TestUtils { try { serviceTemplate = yamlCoder.decode(policyYaml, ToscaServiceTemplate.class); } catch (CoderException e) { - throw new XacmlApplicationException("Failed to decode policy from resource file " - + e.getLocalizedMessage()); + throw new XacmlApplicationException("Failed to decode policy from resource file", e); } // // Make sure all the fields are setup properly -- cgit 1.2.3-korg