commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <robertburrelldon...@blueyonder.co.uk>
Subject Re: Null-safe bean comparator
Date Fri, 06 Aug 2004 19:18:54 GMT
bean comparator's pretty easy so you not submit a patch!

please include a test case :)

see http://jakarta.apache.org/commons/patches.html (and the page linked  
off it).

- robert

On 6 Aug 2004, at 19:51, Serge Knystautas wrote:

> I've started using BeanComparator to sort on a date bean property, but  
> I'm having an issue where sometimes that property is null.  It then  
> gives me a ClassCastException:
>
> java.lang.ClassCastException: java.lang.ClassCastException: There were  
> nulls in the arguments for this method: compare(Sat Sep 04 00:00:00  
> CDT 2004, null)
> 	 at  
> org.apache.commons.beanutils.BeanComparator.compare(BeanComparator.java 
> :145)
>
> I'm only using 1.6, but I didn't see anything in the release notes  
> 1.6.1 or 1.7 that address this.
>
> -- 
> Serge Knystautas
> Lokitech >> software . strategy . design >> http://www.lokitech.com
> p. 301.656.5501
> e. sergek@lokitech.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>


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


Mime
View raw message