diff options
author | 2018-03-16 15:44:07 +0000 | |
---|---|---|
committer | 2018-03-20 15:28:04 +0000 | |
commit | eef3c224cb6cad4b82a96938ade1e42ca881eea2 (patch) | |
tree | 37fc08a9b229e5634c0ffb983227f9f563ac7766 /ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/FirewallConfigPolicy.java | |
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-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/FirewallConfigPolicy.java')
-rw-r--r-- | ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/FirewallConfigPolicy.java | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/FirewallConfigPolicy.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/FirewallConfigPolicy.java index 6e46ab1c0..e747edb9b 100644 --- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/FirewallConfigPolicy.java +++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/FirewallConfigPolicy.java @@ -1265,16 +1265,11 @@ public class FirewallConfigPolicy extends Policy { } private JsonObject stringToJson(String jsonString) { - JsonObject json = null; - if (jsonString != null) { - //Read jsonBody to JsonObject - StringReader in = null; - in = new StringReader(jsonString); - - JsonReader jsonReader = Json.createReader(in); - json = jsonReader.readObject(); - jsonReader.close(); - } + //Read jsonBody to JsonObject + StringReader in = new StringReader(jsonString); + JsonReader jsonReader = Json.createReader(in); + JsonObject json = jsonReader.readObject(); + jsonReader.close(); return json; } |