commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (LANG-291) Null-safe comparison methods for finding most recent / least recent dates.
Date Wed, 15 Nov 2006 04:16:40 GMT
     [ http://issues.apache.org/jira/browse/LANG-291?page=all ]

Henri Yandell resolved LANG-291.
--------------------------------

    Fix Version/s: 2.3
                       (was: 3.0)
       Resolution: Fixed

Bit sooner than I thought:

svn ci -m "Applying max/min for Comparables as supplied by David Karlsen in LANG-291" src/

Sending        src/java/org/apache/commons/lang/ObjectUtils.java
Sending        src/test/org/apache/commons/lang/ObjectUtilsTest.java
Transmitting file data ..
Committed revision 475113.

> Null-safe comparison methods for finding most recent / least recent dates.
> --------------------------------------------------------------------------
>
>                 Key: LANG-291
>                 URL: http://issues.apache.org/jira/browse/LANG-291
>             Project: Commons Lang
>          Issue Type: Improvement
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>             Fix For: 2.3
>
>         Attachments: DateUtils-patch-rev468924.txt, ObjectUtils-patch-rev470351.txt
>
>
> /**
>      * <p>
>      * Null-safe date comparison.
>      * Returnes the most recent date if date1 and date2 is non-null. 
>      * If one of the dates are null, the non-null will be returned.
>      * If both are null, null will be returned.
>      * </p>
>      * @param date1
>      * @param date2
>      * @return
>      */
>     public static Date mostRecent( Date date1, Date date2 )
>  /**
>      * <p>
>      * Null-safe date comparison.
>      * Returnes the least recent (oldest) date if date1 and date2 is non-null. 
>      * If one of the dates are null, the non-null will be returned.
>      * If both are null, null will be returned.
>      * </p>
>      * @param date1
>      * @param date2
>      * @return
>      */
>     public static Date leastRecent( Date date1, Date date2 )

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Mime
View raw message