diff --git a/src/changes/changes.xml b/src/changes/changes.xml index f13bfab28..6673cf8ae 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -22,9 +22,6 @@ - - Constructors of *Utils classes are now protected to allow sub-classing. - "TransformingComparator" did not comply with the contract of Object#equals. diff --git a/src/main/java/org/apache/commons/collections4/ClosureUtils.java b/src/main/java/org/apache/commons/collections4/ClosureUtils.java index 04daba839..48c37cdac 100644 --- a/src/main/java/org/apache/commons/collections4/ClosureUtils.java +++ b/src/main/java/org/apache/commons/collections4/ClosureUtils.java @@ -56,7 +56,7 @@ public class ClosureUtils { /** * This class is not normally instantiated. */ - protected ClosureUtils() {} + private ClosureUtils() {} /** * Gets a Closure that always throws an exception. diff --git a/src/main/java/org/apache/commons/collections4/CollectionUtils.java b/src/main/java/org/apache/commons/collections4/CollectionUtils.java index 7a18b92e3..777fb2e22 100644 --- a/src/main/java/org/apache/commons/collections4/CollectionUtils.java +++ b/src/main/java/org/apache/commons/collections4/CollectionUtils.java @@ -185,7 +185,7 @@ public class CollectionUtils { /** * CollectionUtils should not normally be instantiated. */ - protected CollectionUtils() {} + private CollectionUtils() {} /** * Returns the immutable EMPTY_COLLECTION with generic type safety. diff --git a/src/main/java/org/apache/commons/collections4/ComparatorUtils.java b/src/main/java/org/apache/commons/collections4/ComparatorUtils.java index a4d617807..e17a3d837 100644 --- a/src/main/java/org/apache/commons/collections4/ComparatorUtils.java +++ b/src/main/java/org/apache/commons/collections4/ComparatorUtils.java @@ -43,7 +43,7 @@ public class ComparatorUtils { /** * ComparatorUtils should not normally be instantiated. */ - protected ComparatorUtils() {} + private ComparatorUtils() {} /** * Comparator for natural sort order. diff --git a/src/main/java/org/apache/commons/collections4/EnumerationUtils.java b/src/main/java/org/apache/commons/collections4/EnumerationUtils.java index c364ffb57..b17cc5832 100644 --- a/src/main/java/org/apache/commons/collections4/EnumerationUtils.java +++ b/src/main/java/org/apache/commons/collections4/EnumerationUtils.java @@ -34,7 +34,7 @@ public class EnumerationUtils { /** * EnumerationUtils is not normally instantiated. */ - protected EnumerationUtils() {} + private EnumerationUtils() {} /** * Creates a list based on an enumeration. diff --git a/src/main/java/org/apache/commons/collections4/FactoryUtils.java b/src/main/java/org/apache/commons/collections4/FactoryUtils.java index 55f188d36..5a6263b90 100644 --- a/src/main/java/org/apache/commons/collections4/FactoryUtils.java +++ b/src/main/java/org/apache/commons/collections4/FactoryUtils.java @@ -41,7 +41,7 @@ public class FactoryUtils { /** * This class is not normally instantiated. */ - protected FactoryUtils() {} + private FactoryUtils() {} /** * Gets a Factory that always throws an exception. diff --git a/src/main/java/org/apache/commons/collections4/IteratorUtils.java b/src/main/java/org/apache/commons/collections4/IteratorUtils.java index 4832f307d..c240d9d63 100644 --- a/src/main/java/org/apache/commons/collections4/IteratorUtils.java +++ b/src/main/java/org/apache/commons/collections4/IteratorUtils.java @@ -119,7 +119,7 @@ public class IteratorUtils { /** * IteratorUtils is not normally instantiated. */ - protected IteratorUtils() {} + private IteratorUtils() {} // Empty //----------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/collections4/ListUtils.java b/src/main/java/org/apache/commons/collections4/ListUtils.java index 5f535cbef..e723f762f 100644 --- a/src/main/java/org/apache/commons/collections4/ListUtils.java +++ b/src/main/java/org/apache/commons/collections4/ListUtils.java @@ -46,7 +46,7 @@ public class ListUtils { /** * ListUtils should not normally be instantiated. */ - protected ListUtils() {} + private ListUtils() {} //----------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/collections4/MapUtils.java b/src/main/java/org/apache/commons/collections4/MapUtils.java index 6764e99dd..788e0dc4f 100644 --- a/src/main/java/org/apache/commons/collections4/MapUtils.java +++ b/src/main/java/org/apache/commons/collections4/MapUtils.java @@ -92,7 +92,7 @@ public class MapUtils { /** * MapUtils should not normally be instantiated. */ - protected MapUtils() {} + private MapUtils() {} // Type safe getters //------------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/collections4/MultiMapUtils.java b/src/main/java/org/apache/commons/collections4/MultiMapUtils.java index 7b79e336d..be90de479 100644 --- a/src/main/java/org/apache/commons/collections4/MultiMapUtils.java +++ b/src/main/java/org/apache/commons/collections4/MultiMapUtils.java @@ -48,7 +48,7 @@ public class MultiMapUtils { /** * MultiMapUtils should not normally be instantiated. */ - protected MultiMapUtils() { + private MultiMapUtils() { } /** diff --git a/src/main/java/org/apache/commons/collections4/PredicateUtils.java b/src/main/java/org/apache/commons/collections4/PredicateUtils.java index d31fec039..bab7e4e42 100644 --- a/src/main/java/org/apache/commons/collections4/PredicateUtils.java +++ b/src/main/java/org/apache/commons/collections4/PredicateUtils.java @@ -74,7 +74,7 @@ public class PredicateUtils { /** * This class is not normally instantiated. */ - protected PredicateUtils() {} + private PredicateUtils() {} // Simple predicates //----------------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/collections4/QueueUtils.java b/src/main/java/org/apache/commons/collections4/QueueUtils.java index 3b421ab45..3d6d540f9 100644 --- a/src/main/java/org/apache/commons/collections4/QueueUtils.java +++ b/src/main/java/org/apache/commons/collections4/QueueUtils.java @@ -40,7 +40,7 @@ public class QueueUtils { /** * QueueUtils should not normally be instantiated. */ - protected QueueUtils() {} + private QueueUtils() {} //----------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/collections4/SetUtils.java b/src/main/java/org/apache/commons/collections4/SetUtils.java index 3c76d3911..b96b7e5c0 100644 --- a/src/main/java/org/apache/commons/collections4/SetUtils.java +++ b/src/main/java/org/apache/commons/collections4/SetUtils.java @@ -69,7 +69,7 @@ public class SetUtils { /** * SetUtils should not normally be instantiated. */ - protected SetUtils() {} + private SetUtils() {} //----------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/collections4/SplitMapUtils.java b/src/main/java/org/apache/commons/collections4/SplitMapUtils.java index 3c23b7bf3..c4af3b191 100644 --- a/src/main/java/org/apache/commons/collections4/SplitMapUtils.java +++ b/src/main/java/org/apache/commons/collections4/SplitMapUtils.java @@ -20,11 +20,11 @@ import java.util.Collection; import java.util.Map; import java.util.Set; +import org.apache.commons.collections4.set.UnmodifiableSet; import org.apache.commons.collections4.collection.UnmodifiableCollection; import org.apache.commons.collections4.iterators.UnmodifiableMapIterator; import org.apache.commons.collections4.map.EntrySetToMapIteratorAdapter; import org.apache.commons.collections4.map.UnmodifiableEntrySet; -import org.apache.commons.collections4.set.UnmodifiableSet; /** * Utilities for working with "split maps:" objects that implement {@link Put} @@ -41,7 +41,7 @@ public class SplitMapUtils { /** * SplitMapUtils should not normally be instantiated. */ - protected SplitMapUtils() {} + private SplitMapUtils() {} //----------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/collections4/TransformerUtils.java b/src/main/java/org/apache/commons/collections4/TransformerUtils.java index 2ae52edc6..6be9cb486 100644 --- a/src/main/java/org/apache/commons/collections4/TransformerUtils.java +++ b/src/main/java/org/apache/commons/collections4/TransformerUtils.java @@ -66,7 +66,7 @@ public class TransformerUtils { /** * This class is not normally instantiated. */ - protected TransformerUtils() {} + private TransformerUtils() {} /** * Gets a transformer that always throws an exception. diff --git a/src/main/java/org/apache/commons/collections4/TrieUtils.java b/src/main/java/org/apache/commons/collections4/TrieUtils.java index df0cedbcb..4380cd367 100644 --- a/src/main/java/org/apache/commons/collections4/TrieUtils.java +++ b/src/main/java/org/apache/commons/collections4/TrieUtils.java @@ -29,7 +29,7 @@ public class TrieUtils { /** * {@link TrieUtils} should not normally be instantiated. */ - protected TrieUtils() {} + private TrieUtils() {} /** * Returns an unmodifiable instance of a {@link Trie}