diff options
author | Brian Vosburgh | 2013-11-21 23:31:00 +0000 |
---|---|---|
committer | Brian Vosburgh | 2015-07-16 18:54:40 +0000 |
commit | 5f7b5252c712a61d0902d6357427f0f105f818fa (patch) | |
tree | 3fab03035f560bf20e3c1eeab5a21a8542443b1b | |
parent | 0847528b0f90c0872b8dbf8baa93e85edf94c149 (diff) | |
download | webtools.dali-5f7b5252c712a61d0902d6357427f0f105f818fa.tar.gz webtools.dali-5f7b5252c712a61d0902d6357427f0f105f818fa.tar.xz webtools.dali-5f7b5252c712a61d0902d6357427f0f105f818fa.zip |
tweak CollectionTools.addAll(Collection, Object[])
-rw-r--r-- | common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/collection/CollectionTools.java | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/collection/CollectionTools.java b/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/collection/CollectionTools.java index 83e93eef18..8c534ef30e 100644 --- a/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/collection/CollectionTools.java +++ b/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/collection/CollectionTools.java @@ -90,18 +90,7 @@ public final class CollectionTools { * Return whether the collection changed as a result. */ public static <E> boolean addAll(Collection<? super E> collection, E... array) { - return (array.length != 0) && addAll_(collection, array); - } - - /** - * assume the array is not empty - */ - private static <E> boolean addAll_(Collection<? super E> collection, E... array) { - boolean modified = false; - for (E element : array) { - modified |= collection.add(element); - } - return modified; + return (array.length != 0) && collection.addAll(Arrays.asList(array)); } /** |