poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 51474] New: Nullpointer writing empty (null) value
Date Tue, 05 Jul 2011 09:53:06 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=51474

             Bug #: 51474
           Summary: Nullpointer writing empty (null) value
           Product: POI
           Version: 3.8-dev
          Platform: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: SXSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: daniel.wehrle@damgroup.de
    Classification: Unclassified


Hello,

i get an NPE writing a null value

String value = null;

Workbook workbook = new SXSSFWorkbook();
Sheet sheet = workbook.createSheet();
Row row = sheet.createRow( currentRowNr);
Cell cell = currentRow.createCell( currentCellNr);

cell.setCellValue( new XSSFRichTextString( value));

Error:

java.lang.NullPointerException
    at
org.apache.poi.xssf.streaming.SXSSFSheet$SheetDataWriter.outputQuotedString(SXSSFSheet.java:1384)
    at
org.apache.poi.xssf.streaming.SXSSFSheet$SheetDataWriter.writeCell(SXSSFSheet.java:1349)
    at
org.apache.poi.xssf.streaming.SXSSFSheet$SheetDataWriter.writeRow(SXSSFSheet.java:1289)
    at
org.apache.poi.xssf.streaming.SXSSFSheet.flushOneRow(SXSSFSheet.java:1209)
    at org.apache.poi.xssf.streaming.SXSSFSheet.flushRows(SXSSFSheet.java:1199)
    at
org.apache.poi.xssf.streaming.SXSSFSheet.getWorksheetXMLInputStream(SXSSFSheet.java:61)
    at
org.apache.poi.xssf.streaming.SXSSFWorkbook.injectData(SXSSFWorkbook.java:108)
    at
org.apache.poi.xssf.streaming.SXSSFWorkbook.write(SXSSFWorkbook.java:496)

Kind regards,
Daniel

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message