diff options
author | eramkve <ram.krishna.verma@ericsson.com> | 2018-03-16 15:44:07 +0000 |
---|---|---|
committer | eramkve <ram.krishna.verma@ericsson.com> | 2018-03-20 15:28:04 +0000 |
commit | eef3c224cb6cad4b82a96938ade1e42ca881eea2 (patch) | |
tree | 37fc08a9b229e5634c0ffb983227f9f563ac7766 /ONAP-XACML/src/main/java/org/onap | |
parent | 44fd25bcbb86f8600ec88eeeac6bb8312672c470 (diff) |
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 <ram.krishna.verma@ericsson.com>
Diffstat (limited to 'ONAP-XACML/src/main/java/org/onap')
-rw-r--r-- | ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pap/StdEngine.java | 12 |
1 files changed, 1 insertions, 11 deletions
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); |