commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hendrik Maryns (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CLI-173) Upgrade to Java 5 features
Date Tue, 21 Oct 2008 10:46:44 GMT

    [ https://issues.apache.org/jira/browse/CLI-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12641344#action_12641344
] 

Hendrik Maryns commented on CLI-173:
------------------------------------

I forgot to tell that the problem with the validators is the reason why it is impossible to
generify one of the most important functions in the library: getValues() and its derivatives.
 The logical solution would be to make it a List<String>, but through the validators,
it can suddenly start emitting List<Class<?>> etc.

I would suggest to make it a List<String> and also have getValue() return a String.
We could then have another interface TransformingCommandLine<F,T> which introduces a
method getAndTransformValues() which would return a List<T>.  Haven't thought it through
yet, input welcome.

In any case can the patch be applied now without any consequences (that is, maybe you'll want
to change the part regarding pom.xml and some other files, but the Java part is safe).

Oh, and we should then of course update the documentation too.

> Upgrade to Java 5 features
> --------------------------
>
>                 Key: CLI-173
>                 URL: https://issues.apache.org/jira/browse/CLI-173
>             Project: Commons CLI
>          Issue Type: Improvement
>          Components: CLI-2.x
>    Affects Versions: 2.1
>            Reporter: Hendrik Maryns
>         Attachments: generics.patch
>
>
> Java 5 is end-of-life, and there are no generics to be seen in Commons.  What a shame.
 Anyway, Collections is going there, let's do it here as well.  And while we're at it, introduce
annotations and the like.

-- 
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