Merge this if statement with the enclosing one
Change-Id: I8086a6fc1dc24719c3ffd3785a12c086ab453ae8
Issue-ID: POLICY-233
Signed-off-by: SwapnilPathak <SP00494485@techmahindra.com>
el.put("modifiedBy", getUserName(policy.getModifiedBy()));
resultList.add(el);
}
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());
JSONObject el = new JSONObject();
el.put("name", policy.getPolicyName().substring(policy.getPolicyName().lastIndexOf(File.separator)+1));
el.put("date", policy.getModifiedDate());
el.put("createdBy", getUserName(policy.getCreatedBy()));
el.put("modifiedBy", getUserName(policy.getModifiedBy()));
resultList.add(el);
el.put("createdBy", getUserName(policy.getCreatedBy()));
el.put("modifiedBy", getUserName(policy.getModifiedBy()));
resultList.add(el);