|
From: Peter De B. (JIRA) <no...@sp...> - 2008-01-17 08:34:19
|
[ http://jira.springframework.org/browse/RCP-124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_29093 ]
Peter De Bruycker commented on RCP-124:
---------------------------------------
fixed it:
1. registered comparators get precedence in handling null values
2. the comparators used internally are made nullsafe
> Handling of null values when sorting in ShuttleSortableTableModel
> -----------------------------------------------------------------
>
> Key: RCP-124
> URL: http://jira.springframework.org/browse/RCP-124
> Project: Spring Framework Rich Client Project
> Issue Type: Bug
> Reporter: Adrian Gygax
> Assignee: Peter De Bruycker
> Priority: Minor
> Attachments: ShuttleSortableTableModel_nullvalue.patch
>
>
> org.springframework.richclient.table.ShuttleSortableTableModel has hardcoded behaviour for comparing null values. This makes it impossible for Comparators to handle them. As the Java API docs only recommend Comparables (and not Comparators) to throw a NullPointerException if compared to nulls, the hardcoded behaviour should only be executed if no Comparators are specified.
> For example, in my application I need Dates to be sorted in a non-default way. A null value should be larger instead of smaller than anything. This can easily implemented with a Comparator, if ShuttleSortableTableModel lets it treat this case.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.springframework.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|