Fixing code review comments round 3
@@ -64,14 +64,13 @@ public class IdentityGovernanceAdminClient {
for (ConnectorConfig conf : configs) {
String categoryName = StringUtils.isBlank(conf.getCategory()) ? DEFAULT : conf.getCategory();
String subCategoryName = StringUtils.isBlank(conf.getSubCategory()) ? DEFAULT : conf.getSubCategory();
+
Map<String, List<ConnectorConfig>> subCatMap = catMap.get(categoryName);
- List confList;
if (subCatMap == null) {
subCatMap = new HashMap<>();
- confList = new ArrayList();
- subCatMap.put(subCategoryName, confList);
+ catMap.put(categoryName, subCatMap);
}
- confList = subCatMap.get(subCategoryName);
+ List confList = subCatMap.get(subCategoryName);
if(confList == null) {
confList = new ArrayList();
subCatMap.put(subCategoryName, confList);
