[richfaces-issues] [JBoss JIRA] Commented: (RF-1636) Sorting date-column in scrollableDataTable gives NPE

Jörg von Frantzius (JIRA) jira-events at lists.jboss.org
Thu Dec 20 05:21:32 EST 2007


    [ http://jira.jboss.com/jira/browse/RF-1636?page=comments#action_12393061 ] 
            
Jörg von Frantzius commented on RF-1636:
----------------------------------------

Still occurs with richfaces-ui-3.1.3.GA. The WrappedBeanComparator really should be prepared for null values.

> Sorting date-column in scrollableDataTable gives NPE
> ----------------------------------------------------
>
>                 Key: RF-1636
>                 URL: http://jira.jboss.com/jira/browse/RF-1636
>             Project: RichFaces
>          Issue Type: Bug
>    Affects Versions: 3.1.2
>            Reporter: Alexander Seitz
>         Assigned To: Maksim Kaszynski
>             Fix For: 3.2.0
>
>
> If you try to sort a column (by clicking the column header) containing entries of the type date, you get a NullPointerException in case one or more date-values are empty in the table. 
> Caused by: java.lang.NullPointerException
>         at java.util.Date.getMillisOf(Date.java:939)
>         at java.util.Date.compareTo(Date.java:959)
>         at java.util.Date.compareTo(Date.java:112)
>         at org.richfaces.model.internal.WrappedBeanComparator.compare(WrappedBeanComparator.java:42)
>         at java.util.Arrays.mergeSort(Arrays.java:1270)
>         at java.util.Arrays.sort(Arrays.java:1210)
>         at java.util.Collections.sort(Collections.java:159)
>         at org.richfaces.model.internal.ComponentSortableDataModel.prepareCollection(ComponentSortableDataModel.java:57)
>         at org.richfaces.model.internal.ComponentSortableDataModel.loadData(ComponentSortableDataModel.java:81)
>         at org.richfaces.model.DataModelCache.loadData(DataModelCache.java:153)
>         at org.richfaces.model.ScrollableTableDataModel.walk(ScrollableTableDataModel.java:115)
>         at org.richfaces.model.DataModelCache.walk(DataModelCache.java:183)
>         at org.ajax4jsf.component.UIDataAdaptor.walk(UIDataAdaptor.java:968)
> ...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       




More information about the richfaces-issues mailing list