From 5bc83b197ad010bbdf5916493d078818c2c10bcb Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Tue, 22 Oct 2019 13:06:56 -0400 Subject: Consolidate common translatable code some sonar There is duplicate code for some common translation of policy decision responses and for scanning obligations. Removed some TODO items (left others because I want to look at them more closely). Stored System.lineSeparator into a static var so that I can remove some unnecessary ifs. There's still one left that I am not worried about. Gson as a static variable. Issue-ID: POLICY-2066 Change-Id: I9c8162d5ad1c5f884be347dd94631fa74ca76f85 Signed-off-by: Pamela Dragosh --- .../pdp/application/monitoring/MonitoringPdpApplicationTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'applications/monitoring/src') diff --git a/applications/monitoring/src/test/java/org/onap/policy/xacml/pdp/application/monitoring/MonitoringPdpApplicationTest.java b/applications/monitoring/src/test/java/org/onap/policy/xacml/pdp/application/monitoring/MonitoringPdpApplicationTest.java index 1cba4967..fcb99f30 100644 --- a/applications/monitoring/src/test/java/org/onap/policy/xacml/pdp/application/monitoring/MonitoringPdpApplicationTest.java +++ b/applications/monitoring/src/test/java/org/onap/policy/xacml/pdp/application/monitoring/MonitoringPdpApplicationTest.java @@ -103,7 +103,7 @@ public class MonitoringPdpApplicationTest { // // Look for our class instance and save it // - StringBuilder strDump = new StringBuilder("Loaded applications:" + System.lineSeparator()); + StringBuilder strDump = new StringBuilder("Loaded applications:" + XacmlPolicyUtils.LINE_SEPARATOR); Iterator iterator = applicationLoader.iterator(); while (iterator.hasNext()) { XacmlApplicationServiceProvider application = iterator.next(); @@ -120,7 +120,7 @@ public class MonitoringPdpApplicationTest { strDump.append(application.applicationName()); strDump.append(" supports "); strDump.append(application.supportedPolicyTypes()); - strDump.append(System.lineSeparator()); + strDump.append(XacmlPolicyUtils.LINE_SEPARATOR); } LOGGER.debug("{}", strDump); // -- cgit 1.2.3-korg