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

"data validation" setting causes null pointer exception

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 2.5.0, 3.0.0 RC
    • Fix Version/s: 3.0.0 RC
    • Component/s: ZSS Component
    • Labels:

      Description

      problem description

      [cell-data] \ data validation.
      if a sheet contains "data validation" configuration with empty criteria, it causes null pointer exception when displaying it, then crashed

      >>java.lang.NullPointerException
      >>	at org.zkoss.zss.model.sys.impl.BookHelper.getFormatText(BookHelper.java:1009)
      >>	at org.zkoss.zss.model.sys.impl.BookHelper.getCellText(BookHelper.java:1032)
      >>	at org.zkoss.zss.model.sys.impl.BookHelper.getValidationList(BookHelper.java:4927)
      >>	at org.zkoss.zss.ui.Spreadsheet.convertDataValidationToJSON(Spreadsheet.java:1481)
      >>	at org.zkoss.zss.ui.Spreadsheet.convertDataValidationToJSON(Spreadsheet.java:1451)
      >>	at org.zkoss.zss.ui.Spreadsheet.updateSheetAttributes(Spreadsheet.java:856)
      >>	at org.zkoss.zss.ui.Spreadsheet.setSelectedSheetDirectly(Spreadsheet.java:791)
      >>	at org.zkoss.zss.ui.Spreadsheet.access$42(Spreadsheet.java:769)
      >>	at org.zkoss.zss.ui.Spreadsheet$ExtraCtrl.setSelectedSheetDirectly(Spreadsheet.java:3520)
      >>	at org.zkoss.zss.ui.au.in.SelectSheetCommand.process(SelectSheetCommand.java:79)
      >>	at org.zkoss.zss.ui.Spreadsheet.service(Spreadsheet.java:4712)
      >>	at org.zkoss.zk.ui.impl.DesktopImpl.service(DesktopImpl.java:701)
      >>	at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1201)
      >>	at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:600)
      >>	at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:482)
      >>	at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:491)
      >>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      

      reproducing steps

      you can "cell-data" sheet in the attachment to reproduce it.

        Attachments

          Activity

            People

            • Assignee:
              paowang paowang
              Reporter:
              hawk hawk
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: