Uploaded image for project: 'Keikai'
  1. Keikai
  2. KEIKAI-546

a space character in number format causes java.lang.NullPointerException

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 5.8.1
    • Fix Version/s: 5.10.0
    • Component/s: None
    • Security Level: Jimmy
    • Labels:
      None

      Description

      Steps to Reproduce

      1. load a blank sheet
      2. set number format at A1 with ##,###,##0.00 ; [RED] -##,###,##0.00
      there is space character in front of [RED]
      3. enter -1 at A1

      Current Result

      java.lang.NullPointerException
      	at org.zkoss.poi.ss.format.CellFormat.apply(CellFormat.java:255)
      	at io.keikai.model.impl.sys.FormatEngineImpl.format0(FormatEngineImpl.java:108)
      	at io.keikai.model.impl.sys.FormatEngineImpl.format(FormatEngineImpl.java:70)
      	at io.keikai.ui.impl.CellFormatHelper.getFormatResult(CellFormatHelper.java:1020)
      	at io.keikai.ui.SpreadsheetCtrlImpl.getCellAttr(SpreadsheetCtrlImpl.java:535)
      	at io.keikai.ui.SpreadsheetCtrlImpl.getRangeAttrs(SpreadsheetCtrlImpl.java:382)
      	at io.keikai.ui.Spreadsheet.responseUpdateCell(Spreadsheet.java:2521)
      	at io.keikai.ui.Spreadsheet.updateCell(Spreadsheet.java:2486)
      	at io.keikai.ui.InnerModelEventDispatcher.onCellContentChange(InnerModelEventDispatcher.java:228)
      	at io.keikai.ui.ModelEventDispatcher.onEvent(ModelEventDispatcher.java:45)
      	at io.keikai.model.impl.EventQueueListenerAdaptor$WrappedListener.onEvent(EventQueueListenerAdaptor.java:106)
      	at org.zkoss.zk.ui.event.impl.DesktopEventQueue$QueueListener.onEvent(DesktopEventQueue.java:168)
      	at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:3190)
      	at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:3160)
      	at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:3102)
      	at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:138)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1884)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1656)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1323)
      	at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:571)
      

      Expected Result

      show -1 in red without errors

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jumperchen jumperchen
              Reporter:
              hawk hawk
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: