commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 18791] - BeanComparator should handle null property values (?)
Date Tue, 08 Apr 2003 11:42:41 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18791>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18791

BeanComparator should handle null property values (?)





------- Additional Comments From epugh@upstate.com  2003-04-08 11:42 -------
When I originally wrote the BeanComparator, I had that type of functionality, 
but it was removed for the initial commit because of exactly that issue.  Who 
comes first, the null or the not null value?

To get around this, I wrote a NullComparator that allows you to specify who 
comes first, the null or the not null value.  I then wrapped the bean 
comparator in the null comparator using the comparatorChain.  

I think add this functionality directly confuses the BeanComparator.  And also, 
you could argue other comparators suffer from the same issue with nulls.  If 
you want to see some code, let me know.
Eric

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