commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Neidhart <thomas.neidh...@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:21:55 GMT
On 05/01/2014 03:03 PM, sebb wrote:
> 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.

I consider this to be a compromise considering the fact that previously
the util classes all had a public constructor.

So when people are migrating from 3.2.1 to 4.0, they have some troubles.
To ease the migration I thought that making it protected is safe:

 * it can not be instantiated
 * if somebody wants to sub-class: at your own risk, like before

The composition approach is the right way to go, and I would personally
never do something like the issue originator.

Thomas

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


Mime
View raw message