From eef3c224cb6cad4b82a96938ade1e42ca881eea2 Mon Sep 17 00:00:00 2001 From: eramkve Date: Fri, 16 Mar 2018 15:44:07 +0000 Subject: Fix all bugs reported by Sonar in policy/engine Code fixes for 27 bugs reported by Sonar in policy/engine Change-Id: I96da96b38a2e2954ec549e5cdf6ed3ad1d76722c Issue-ID: POLICY-662 Signed-off-by: eramkve --- .../main/java/org/onap/policy/xacml/std/pap/StdEngine.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'ONAP-XACML') diff --git a/ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pap/StdEngine.java b/ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pap/StdEngine.java index ca2271ab4..d3dc7ae18 100644 --- a/ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pap/StdEngine.java +++ b/ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pap/StdEngine.java @@ -180,18 +180,8 @@ public class StdEngine extends StdPDPItemSetChangeNotifier implements PAPPolicyE // We don't have the default group, create it // String defaultId = properties.getProperty(PROP_PAP_GROUPS_DEFAULT, PROP_PAP_GROUPS_DEFAULT_NAME); - if(defaultId == null){ - defaultId = PROP_PAP_GROUPS_DEFAULT_NAME; - } - if("".equals(defaultId)){ - defaultId = PROP_PAP_GROUPS_DEFAULT_NAME; - } - //we're going to check one more time in case the PROP_PAP_GROUPS_DEFAULT_NAME doesn't exist - if(defaultId == null){ - defaultId = "default"; - } if("".equals(defaultId)){ - defaultId = "default"; + defaultId = PROP_PAP_GROUPS_DEFAULT_NAME; } logger.warn("Default group does NOT exist, creating " + defaultId); Path defaultPath = Paths.get(this.repository.toString(), defaultId); -- cgit 1.2.3-korg