commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: svn commit: r1591602 - in /commons/proper/collections/trunk/src: changes/ main/java/org/apache/commons/collections4/
Date Thu, 01 May 2014 13:03:23 GMT
On 1 May 2014 12:05,  <tn@apache.org> wrote:
> Author: tn
> Date: Thu May  1 11:04:59 2014
> New Revision: 1591602
>
> URL: http://svn.apache.org/r1591602
> Log:
> [COLLECTIONS-519] Constructors of *Utils classes are now protected to allow sub-classing.
Thanks to Radoslav Paskalev, Daniel Feist.

-1

I don't think this is a good idea.

See my comments on the JIRA issue.

> Modified:
>     commons/proper/collections/trunk/src/changes/changes.xml
>     commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/ClosureUtils.java
>     commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/CollectionUtils.java
>     commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/ComparatorUtils.java
>     commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/EnumerationUtils.java
>     commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/FactoryUtils.java
>     commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/IteratorUtils.java
>     commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/ListUtils.java
>     commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MapUtils.java
>     commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MultiMapUtils.java
>     commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/PredicateUtils.java
>     commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/QueueUtils.java
>     commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/SetUtils.java
>     commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/SplitMapUtils.java
>     commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/TransformerUtils.java
>     commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/TrieUtils.java
>
> Modified: commons/proper/collections/trunk/src/changes/changes.xml
> URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/changes/changes.xml?rev=1591602&r1=1591601&r2=1591602&view=diff
> ==============================================================================
> --- commons/proper/collections/trunk/src/changes/changes.xml (original)
> +++ commons/proper/collections/trunk/src/changes/changes.xml Thu May  1 11:04:59 2014
> @@ -22,6 +22,9 @@
>    <body>
>
>    <release version="4.1" date="TBD" description="">
> +    <action issue="COLLECTIONS-519" dev="tn" type="fix" due-to="Radoslav Paskalev,
Daniel Feist">
> +      Constructors of *Utils classes are now protected to allow sub-classing.
> +    </action>
>      <action issue="COLLECTIONS-512" dev="tn" type="fix" due-to="Cyrille Artho">
>        "TransformingComparator" did not comply with the contract of Object#equals.
>      </action>
>
> Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/ClosureUtils.java
> URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/ClosureUtils.java?rev=1591602&r1=1591601&r2=1591602&view=diff
> ==============================================================================
> --- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/ClosureUtils.java
(original)
> +++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/ClosureUtils.java
Thu May  1 11:04:59 2014
> @@ -56,7 +56,7 @@ public class ClosureUtils {
>      /**
>       * This class is not normally instantiated.
>       */
> -    private ClosureUtils() {}
> +    protected ClosureUtils() {}
>
>      /**
>       * Gets a Closure that always throws an exception.
>
> Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/CollectionUtils.java
> URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/CollectionUtils.java?rev=1591602&r1=1591601&r2=1591602&view=diff
> ==============================================================================
> --- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/CollectionUtils.java
(original)
> +++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/CollectionUtils.java
Thu May  1 11:04:59 2014
> @@ -185,7 +185,7 @@ public class CollectionUtils {
>      /**
>       * <code>CollectionUtils</code> should not normally be instantiated.
>       */
> -    private CollectionUtils() {}
> +    protected CollectionUtils() {}
>
>      /**
>       * Returns the immutable EMPTY_COLLECTION with generic type safety.
>
> Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/ComparatorUtils.java
> URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/ComparatorUtils.java?rev=1591602&r1=1591601&r2=1591602&view=diff
> ==============================================================================
> --- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/ComparatorUtils.java
(original)
> +++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/ComparatorUtils.java
Thu May  1 11:04:59 2014
> @@ -43,7 +43,7 @@ public class ComparatorUtils {
>      /**
>       * ComparatorUtils should not normally be instantiated.
>       */
> -    private ComparatorUtils() {}
> +    protected ComparatorUtils() {}
>
>      /**
>       * Comparator for natural sort order.
>
> Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/EnumerationUtils.java
> URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/EnumerationUtils.java?rev=1591602&r1=1591601&r2=1591602&view=diff
> ==============================================================================
> --- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/EnumerationUtils.java
(original)
> +++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/EnumerationUtils.java
Thu May  1 11:04:59 2014
> @@ -34,7 +34,7 @@ public class EnumerationUtils {
>      /**
>       * EnumerationUtils is not normally instantiated.
>       */
> -    private EnumerationUtils() {}
> +    protected EnumerationUtils() {}
>
>      /**
>       * Creates a list based on an enumeration.
>
> Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/FactoryUtils.java
> URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/FactoryUtils.java?rev=1591602&r1=1591601&r2=1591602&view=diff
> ==============================================================================
> --- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/FactoryUtils.java
(original)
> +++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/FactoryUtils.java
Thu May  1 11:04:59 2014
> @@ -41,7 +41,7 @@ public class FactoryUtils {
>      /**
>       * This class is not normally instantiated.
>       */
> -    private FactoryUtils() {}
> +    protected FactoryUtils() {}
>
>      /**
>       * Gets a Factory that always throws an exception.
>
> Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/IteratorUtils.java
> URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/IteratorUtils.java?rev=1591602&r1=1591601&r2=1591602&view=diff
> ==============================================================================
> --- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/IteratorUtils.java
(original)
> +++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/IteratorUtils.java
Thu May  1 11:04:59 2014
> @@ -119,7 +119,7 @@ public class IteratorUtils {
>      /**
>       * IteratorUtils is not normally instantiated.
>       */
> -    private IteratorUtils() {}
> +    protected IteratorUtils() {}
>
>      // Empty
>      //-----------------------------------------------------------------------
>
> Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/ListUtils.java
> URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/ListUtils.java?rev=1591602&r1=1591601&r2=1591602&view=diff
> ==============================================================================
> --- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/ListUtils.java
(original)
> +++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/ListUtils.java
Thu May  1 11:04:59 2014
> @@ -46,7 +46,7 @@ public class ListUtils {
>      /**
>       * <code>ListUtils</code> should not normally be instantiated.
>       */
> -    private ListUtils() {}
> +    protected ListUtils() {}
>
>      //-----------------------------------------------------------------------
>
>
> Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MapUtils.java
> URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MapUtils.java?rev=1591602&r1=1591601&r2=1591602&view=diff
> ==============================================================================
> --- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MapUtils.java
(original)
> +++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MapUtils.java
Thu May  1 11:04:59 2014
> @@ -92,7 +92,7 @@ public class MapUtils {
>      /**
>       * <code>MapUtils</code> should not normally be instantiated.
>       */
> -    private MapUtils() {}
> +    protected MapUtils() {}
>
>      // Type safe getters
>      //-------------------------------------------------------------------------
>
> Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MultiMapUtils.java
> URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MultiMapUtils.java?rev=1591602&r1=1591601&r2=1591602&view=diff
> ==============================================================================
> --- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MultiMapUtils.java
(original)
> +++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MultiMapUtils.java
Thu May  1 11:04:59 2014
> @@ -48,7 +48,7 @@ public class MultiMapUtils {
>      /**
>       * <code>MultiMapUtils</code> should not normally be instantiated.
>       */
> -    private MultiMapUtils() {
> +    protected MultiMapUtils() {
>      }
>
>      /**
>
> Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/PredicateUtils.java
> URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/PredicateUtils.java?rev=1591602&r1=1591601&r2=1591602&view=diff
> ==============================================================================
> --- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/PredicateUtils.java
(original)
> +++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/PredicateUtils.java
Thu May  1 11:04:59 2014
> @@ -74,7 +74,7 @@ public class PredicateUtils {
>      /**
>       * This class is not normally instantiated.
>       */
> -    private PredicateUtils() {}
> +    protected PredicateUtils() {}
>
>      // Simple predicates
>      //-----------------------------------------------------------------------------
>
> Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/QueueUtils.java
> URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/QueueUtils.java?rev=1591602&r1=1591601&r2=1591602&view=diff
> ==============================================================================
> --- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/QueueUtils.java
(original)
> +++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/QueueUtils.java
Thu May  1 11:04:59 2014
> @@ -40,7 +40,7 @@ public class QueueUtils {
>      /**
>       * <code>QueueUtils</code> should not normally be instantiated.
>       */
> -    private QueueUtils() {}
> +    protected QueueUtils() {}
>
>      //-----------------------------------------------------------------------
>
>
> Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/SetUtils.java
> URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/SetUtils.java?rev=1591602&r1=1591601&r2=1591602&view=diff
> ==============================================================================
> --- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/SetUtils.java
(original)
> +++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/SetUtils.java
Thu May  1 11:04:59 2014
> @@ -69,7 +69,7 @@ public class SetUtils {
>      /**
>       * <code>SetUtils</code> should not normally be instantiated.
>       */
> -    private SetUtils() {}
> +    protected SetUtils() {}
>
>      //-----------------------------------------------------------------------
>
>
> Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/SplitMapUtils.java
> URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/SplitMapUtils.java?rev=1591602&r1=1591601&r2=1591602&view=diff
> ==============================================================================
> --- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/SplitMapUtils.java
(original)
> +++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/SplitMapUtils.java
Thu May  1 11:04:59 2014
> @@ -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 {
>      /**
>       * <code>SplitMapUtils</code> should not normally be instantiated.
>       */
> -    private SplitMapUtils() {}
> +    protected SplitMapUtils() {}
>
>      //-----------------------------------------------------------------------
>
>
> Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/TransformerUtils.java
> URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/TransformerUtils.java?rev=1591602&r1=1591601&r2=1591602&view=diff
> ==============================================================================
> --- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/TransformerUtils.java
(original)
> +++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/TransformerUtils.java
Thu May  1 11:04:59 2014
> @@ -66,7 +66,7 @@ public class TransformerUtils {
>      /**
>       * This class is not normally instantiated.
>       */
> -    private TransformerUtils() {}
> +    protected TransformerUtils() {}
>
>      /**
>       * Gets a transformer that always throws an exception.
>
> Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/TrieUtils.java
> URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/TrieUtils.java?rev=1591602&r1=1591601&r2=1591602&view=diff
> ==============================================================================
> --- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/TrieUtils.java
(original)
> +++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/TrieUtils.java
Thu May  1 11:04:59 2014
> @@ -29,7 +29,7 @@ public class TrieUtils {
>      /**
>       * {@link TrieUtils} should not normally be instantiated.
>       */
> -    private TrieUtils() {}
> +    protected TrieUtils() {}
>
>      /**
>       * Returns an unmodifiable instance of a {@link Trie}
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message