commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <>
Subject [jira] Resolved: (LANG-495) Possible implementation of max/min using generics
Date Fri, 20 Mar 2009 17:14:50 GMT


Sebb resolved LANG-495.

    Resolution: Fixed

[Omitted annotations changes]

commit -m "LANG-495 - add generics for max and min" 
    Committed revision 756634.

> Possible implementation of max/min using generics
> -------------------------------------------------
>                 Key: LANG-495
>                 URL:
>             Project: Commons Lang
>          Issue Type: Improvement
>            Reporter: Sebb
>         Attachments: ObjectUtils.patch
> Attached is a patch to add generics to max and min. 
> It seems to work OK with the current tests.
> It causes a compile-time error if one tries to code e.g. ObjectUtils.max(String,Integer).
> Previously that was allowed, but would cause a class cast exception at run time.
> Can anyone review please?
> BTW, the tests for max/min use Comparable instead of Date - is there a good reason for
this? User code is likely to use the actual type in this case.
> Changing Comparable to Date fixes various raw type warnings.

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

View raw message