ctubbsii commented on a change in pull request #2112:
URL: https://github.com/apache/accumulo/pull/2112#discussion_r634527549



##########
File path: 
core/src/main/java/org/apache/accumulo/core/util/LocalityGroupUtil.java
##########
@@ -377,11 +377,11 @@ public static void seek(FileSKVIterator reader, Range 
range, String lgName,
     if (lgName == null) {
       // this is the default locality group, create a set of all families not 
in the default group
       Set<ByteSequence> nonDefaultFamilies = new HashSet<>();
-      for (Entry<String,ArrayList<ByteSequence>> entry : 
localityGroupCF.entrySet()) {
-        if (entry.getKey() != null) {
-          nonDefaultFamilies.addAll(entry.getValue());
+      localityGroupCF.forEach((k, v) -> {
+        if (k != null) {
+          nonDefaultFamilies.addAll(v);
         }
-      }
+      });

Review comment:
       Thanks for the analysis, @milleruntime . HashMap does support a single 
null key and multiple null values, but that doesn't necessarily mean it's a 
good idea. However, if there's any improvements needed to avoid a null key, 
it's unrelated to this PR.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to