commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <j...@apache.org>
Subject [jira] Commented: (IO-241) CompositeFileComparator(Comparator<File>... delegates) - Using varargs for non-reifiable type goes against type-safety
Date Wed, 04 Aug 2010 23:18:15 GMT

    [ https://issues.apache.org/jira/browse/IO-241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12895465#action_12895465
] 

Niall Pemberton commented on IO-241:
------------------------------------

The class already has a constructor which takes an Iterable - so that already covers Lists
and more. The varargs constructor is convenient and just because it generates a warning in
an IDE isn't IMO a good enough reason to remove it.

> CompositeFileComparator(Comparator<File>... delegates) - Using varargs for non-reifiable
type goes against type-safety
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: IO-241
>                 URL: https://issues.apache.org/jira/browse/IO-241
>             Project: Commons IO
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sebb
>
> The constructor CompositeFileComparator(Comparator<File>... delegates)  cannot
be used without generating a Type safety warning.
> This is because the type is not reifiable.
> This is a new class, so I suggest this constructor is replaced with something that supports
type-safety, for example List.

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


Mime
View raw message