diff options
author | SwapnilPathak <SP00494485@techmahindra.com> | 2017-09-14 12:26:53 +0530 |
---|---|---|
committer | SwapnilPathak <SP00494485@techmahindra.com> | 2017-09-14 12:29:19 +0530 |
commit | 2ec4d9996e8185f83d6095dfaaa905442b5614b7 (patch) | |
tree | d16425ed4f1e85055da3eaf417ff6389f199fe3e /POLICY-SDK-APP/src/main/java | |
parent | b690f0a6776194ab085b9925f4811124203639ae (diff) |
Sonar Major
Merge this if statement with the enclosing one
Change-Id: I8086a6fc1dc24719c3ffd3785a12c086ab453ae8
Issue-ID: POLICY-233
Signed-off-by: SwapnilPathak <SP00494485@techmahindra.com>
Diffstat (limited to 'POLICY-SDK-APP/src/main/java')
-rw-r--r-- | POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyManagerServlet.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyManagerServlet.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyManagerServlet.java index b4817147c..552537900 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyManagerServlet.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyManagerServlet.java @@ -736,8 +736,7 @@ public class PolicyManagerServlet extends HttpServlet { el.put("modifiedBy", getUserName(policy.getModifiedBy())); resultList.add(el); } - }else if(!scopes.isEmpty()){ - if(scopes.contains(scopeNameValue)){ + }else if(!scopes.isEmpty() && scopes.contains(scopeNameValue)){ JSONObject el = new JSONObject(); el.put("name", policy.getPolicyName().substring(policy.getPolicyName().lastIndexOf(File.separator)+1)); el.put("date", policy.getModifiedDate()); @@ -747,7 +746,6 @@ public class PolicyManagerServlet extends HttpServlet { el.put("createdBy", getUserName(policy.getCreatedBy())); el.put("modifiedBy", getUserName(policy.getModifiedBy())); resultList.add(el); - } } } } |