diff --git a/src/main/java/org/apache/commons/collections4/ComparatorUtils.java b/src/main/java/org/apache/commons/collections4/ComparatorUtils.java index c4416e8d4..0fac39bb7 100644 --- a/src/main/java/org/apache/commons/collections4/ComparatorUtils.java +++ b/src/main/java/org/apache/commons/collections4/ComparatorUtils.java @@ -41,7 +41,7 @@ import org.apache.commons.collections4.comparators.TransformingComparator; */ public class ComparatorUtils { - private static final Comparator[] EMPTY_COMPARATOR_ARRAY = new Comparator[0]; + private static final Comparator[] EMPTY_COMPARATOR_ARRAY = {}; /** * Don't allow instances. diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/HasherBloomFilter.java b/src/main/java/org/apache/commons/collections4/bloomfilter/HasherBloomFilter.java index 71272e65c..1124f4844 100644 --- a/src/main/java/org/apache/commons/collections4/bloomfilter/HasherBloomFilter.java +++ b/src/main/java/org/apache/commons/collections4/bloomfilter/HasherBloomFilter.java @@ -37,7 +37,7 @@ import org.apache.commons.collections4.iterators.IteratorChain; */ public class HasherBloomFilter extends AbstractBloomFilter { /** The bit representation for an empty Bloom filter. */ - private static final long[] EMPTY = new long[0]; + private static final long[] EMPTY = {}; /** * The internal hasher representation. diff --git a/src/main/java/org/apache/commons/collections4/functors/ChainedTransformer.java b/src/main/java/org/apache/commons/collections4/functors/ChainedTransformer.java index 3cc39de68..5cb2b1f74 100644 --- a/src/main/java/org/apache/commons/collections4/functors/ChainedTransformer.java +++ b/src/main/java/org/apache/commons/collections4/functors/ChainedTransformer.java @@ -33,7 +33,7 @@ import org.apache.commons.collections4.Transformer; */ public class ChainedTransformer implements Transformer, Serializable { - private static final Transformer[] EMPTY_TRANSFORMER_ARRAY = new Transformer[0]; + private static final Transformer[] EMPTY_TRANSFORMER_ARRAY = {}; /** Serial version UID */ private static final long serialVersionUID = 3514945074733160196L; diff --git a/src/main/java/org/apache/commons/collections4/map/CompositeMap.java b/src/main/java/org/apache/commons/collections4/map/CompositeMap.java index 7c48f2493..118c3e384 100644 --- a/src/main/java/org/apache/commons/collections4/map/CompositeMap.java +++ b/src/main/java/org/apache/commons/collections4/map/CompositeMap.java @@ -47,7 +47,7 @@ import org.apache.commons.collections4.collection.CompositeCollection; */ public class CompositeMap extends AbstractIterableMap implements Serializable { - private static final Map[] EMPTY_MAP_ARRAY = new Map[0]; + private static final Map[] EMPTY_MAP_ARRAY = {}; /** Serialization version */ private static final long serialVersionUID = -6096931280583808322L;