Improve code quality
[aai/sparky-be.git] / sparkybe-onap-service / src / main / java / org / onap / aai / sparky / sync / entity / ObjectIdCollection.java
index 7c91cd2..8e9d2f5 100644 (file)
@@ -29,8 +29,8 @@ import java.util.concurrent.ConcurrentHashMap;
  */
 public class ObjectIdCollection {
 
-  protected ConcurrentHashMap<String, String> importedObjectIds =
-      new ConcurrentHashMap<String, String>();
+  private ConcurrentHashMap<String, String> importedObjectIds =
+      new ConcurrentHashMap<>();
 
   public Collection<String> getImportedObjectIds() {
     return importedObjectIds.values();
@@ -58,11 +58,7 @@ public class ObjectIdCollection {
     if (items == null) {
       return;
     }
-
-    items.stream().forEach((item) -> {
-      importedObjectIds.putIfAbsent(item, item);
-    });
-
+    items.forEach(it -> importedObjectIds.putIfAbsent(it, it));
   }
 
   /**