Uploaded image for project: 'ZK Spreadsheet'
  1. ZK Spreadsheet
  2. ZSS-291

sorting a group of number with style causes null pointer exception

XMLWordPrintable

      Problem Description:

      sorting a group of number with style causes a null pointer exception. If the text to be sorted has no style, sorting works as expected.
      only happened in branch 3.0

      Reproducing Steps:

      1. displaying attached Excel file
      2. select those texts with style
      3. click sort button to sort "Ascending".

      Expected:
      text are sorted.

      Actual:

      an exception thrown.

      >>java.lang.NullPointerException
      >>	at org.zkoss.zss.api.model.impl.EnumUtil.toRangeSortDataOption(EnumUtil.java:488)
      >>	at org.zkoss.zss.api.impl.RangeImpl.sort(RangeImpl.java:509)
      >>	at org.zkoss.zss.api.impl.RangeImpl.sort(RangeImpl.java:485)
      >>	at org.zkoss.zss.api.impl.RangeImpl.sort(RangeImpl.java:469)
      >>	at org.zkoss.zss.api.CellOperationUtil.sort(CellOperationUtil.java:501)
      >>	at org.zkoss.zss.ui.DefaultUserActionHandler.doSortAscending(DefaultUserActionHandler.java:1153)
      >>	at org.zkoss.zss.ui.DefaultUserActionHandler.dispatchAction(DefaultUserActionHandler.java:214)
      >>	at org.zkoss.zss.ui.DefaultUserActionHandler.onEvent(DefaultUserActionHandler.java:1467)
      >>	at org.zkoss.zss.ui.Spreadsheet$3.onEvent(Spreadsheet.java:345)
      >>	at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2742)
      >>	at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2713)
      >>	at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2654)
      >>	at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136)
      >>	at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1717)
      >>	at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1502)
      >>	at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1212)
      >>	at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:600)
      

            dennis dennis
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: