Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-1636

Sorting date-column in scrollableDataTable gives NPE

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Cannot Reproduce Bug
    • Affects Version/s: 3.1.2
    • Fix Version/s: 3.1.5, 3.2.0
    • Component/s: None
    • Labels:
      None

      Description

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

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mvitenkov Mikhail Vitenkov
                Reporter:
                brachie Alexander Seitz
              • Votes:
                1 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: