This is an automated email from the ASF dual-hosted git repository. garydgregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit e2a9c541c020d2a77e4d75e3661b3b339928f71e Author: Gary Gregory <[email protected]> AuthorDate: Sun Jun 14 21:14:00 2026 +0000 Inline single use variables --- src/main/java/org/apache/commons/collections4/MultiMapUtils.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/apache/commons/collections4/MultiMapUtils.java b/src/main/java/org/apache/commons/collections4/MultiMapUtils.java index 11806413d..4e8ceb966 100644 --- a/src/main/java/org/apache/commons/collections4/MultiMapUtils.java +++ b/src/main/java/org/apache/commons/collections4/MultiMapUtils.java @@ -106,8 +106,7 @@ public class MultiMapUtils { */ public static <K, V> Bag<V> getValuesAsBag(final MultiValuedMap<K, V> map, final K key) { if (map != null) { - final Collection<V> col = map.get(key); - return new HashBag<>(col); + return new HashBag<>(map.get(key)); } return null; } @@ -123,8 +122,7 @@ public class MultiMapUtils { */ public static <K, V> List<V> getValuesAsList(final MultiValuedMap<K, V> map, final K key) { if (map != null) { - final Collection<V> col = map.get(key); - return new ArrayList<>(col); + return new ArrayList<>(map.get(key)); } return null; } @@ -140,8 +138,7 @@ public class MultiMapUtils { */ public static <K, V> Set<V> getValuesAsSet(final MultiValuedMap<K, V> map, final K key) { if (map != null) { - final Collection<V> col = map.get(key); - return new HashSet<>(col); + return new HashSet<>(map.get(key)); } return null; }
