commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Serge Knystautas <ser...@lokitech.com>
Subject Null-safe bean comparator
Date Fri, 06 Aug 2004 18:51:28 GMT
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


Mime
View raw message