This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/main by this push: new af2d2d6 Improve LocalityGroupUtil.java (#2112) af2d2d6 is described below commit af2d2d630094fc06e0ac1d6702a9a49d30ec1e94 Author: slackwinner <50567198+slackwin...@users.noreply.github.com> AuthorDate: Tue May 18 13:58:47 2021 -0400 Improve LocalityGroupUtil.java (#2112) This commit contains minor changes to utilize Map.forEach() method instead of Map.entrySet(). This fixes #2041 --- .../java/org/apache/accumulo/core/util/LocalityGroupUtil.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/org/apache/accumulo/core/util/LocalityGroupUtil.java b/core/src/main/java/org/apache/accumulo/core/util/LocalityGroupUtil.java index be6b608..3c0a18e 100644 --- a/core/src/main/java/org/apache/accumulo/core/util/LocalityGroupUtil.java +++ b/core/src/main/java/org/apache/accumulo/core/util/LocalityGroupUtil.java @@ -377,11 +377,11 @@ public class LocalityGroupUtil { 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); } - } + }); families = nonDefaultFamilies; inclusive = false;