commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Kestle (JIRA)" <>
Subject [jira] Resolved: (COLLECTIONS-276) *Utils classes should not be extensible or able to be instantiated.
Date Mon, 12 Nov 2007 11:19:51 GMT


Stephen Kestle resolved COLLECTIONS-276.

    Resolution: Won't Fix

Ok - sounds good.  I'm just having a little difficulty migrating from an "everything final
/ functional" style to "open / api".

Next time I'll raise my "thoughts out loud" on the mailing list first :).  My apologies.

> *Utils classes should not be extensible or able to be instantiated.
> -------------------------------------------------------------------
>                 Key: COLLECTIONS-276
>                 URL:
>             Project: Commons Collections
>          Issue Type: Improvement
>    Affects Versions: Generics
>            Reporter: Stephen Kestle
>            Priority: Minor
>             Fix For: Generics
> I don't see any good reason why this CollectionUtils (and others) isn't final with a
private constructor.  There are no non-static methods, and any extension of them is going
to have to call through to the super to avoid compiler warnings.
> e.g. will provoke the warning that "static methods should
be called directly" (on CollectionUtils).
> Which would mean
> MyCollectionUtils{
> public static Collection select(){
>     return;
> }
> Which really defeats the purpose.  In Java5, we have static imports now -  these provide
more benefit than previous extension did anyhow.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message