You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2003/04/08 13:42:41 UTC

DO NOT REPLY [Bug 18791] - BeanComparator should handle null property values (?)

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