try{
Set<String> scopes = null;
List<String> roles = null;
- data = new ArrayList<Object>();
+ data = new ArrayList<>();
String userId = UserUtils.getUserSession(request).getOrgUserId();
Map<String, Object> model = new HashMap<>();
ObjectMapper mapper = new ObjectMapper();
String id = name;
if (id.endsWith(".xml")) {
id = id.replace(".xml", "");
- id = id.substring(0, id.lastIndexOf("."));
+ id = id.substring(0, id.lastIndexOf('.'));
}
// Default policy to be Root policy; user can change to deferred
ObjectMapper mapper = new ObjectMapper();
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
JsonNode root = mapper.readTree(request.getReader());
- StdPDPGroup group = (StdPDPGroup)mapper.readValue(root.get("activePdpGroup").toString(), StdPDPGroup.class);
+ StdPDPGroup group = mapper.readValue(root.get("activePdpGroup").toString(), StdPDPGroup.class);
JsonNode removePolicyData = root.get("data");
String userId = UserUtils.getUserSession(request).getOrgUserId();
policyContainer = new PDPPolicyContainer(group);
if(removePolicyData.size() > 0){
for(int i = 0 ; i < removePolicyData.size(); i++){
- String data = removePolicyData.get(i).toString();
- this.policyContainer.removeItem(data);
+ String polData = removePolicyData.get(i).toString();
+ this.policyContainer.removeItem(polData);
}
Set<PDPPolicy> changedPolicies = new HashSet<>();
changedPolicies.addAll((Collection<PDPPolicy>) this.policyContainer.getItemIds());
return null;
}
-}
\ No newline at end of file
+}