https://issues.apache.org/bugzilla/show_bug.cgi?id=50795

           Summary: Moving cell comment crashes Excel file
           Product: POI
           Version: 3.7
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Created an attachment (id=26668)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26668)
CellCommentTest.xlsx

Steps:
1. Create Excel file.
2. Add cell comment.
3. Process with POI. Get our created cell comment and try to set to another
cell.
  XSSFCell cell = row.getCell(0);
  XSSFComment comment = cell.getCellComment();
  XSSFCell cellWithoutComment = row.getCell(1);
  cellWithoutComment.setCellComment(comment);
4. Try to save changes
  FileOutputStream out = new FileOutputStream(testFilePath);
  wb.write(out);
  out.close();

Actual result: NPE appears, file size = 0 bytes
Expected: comment moved successfull (in 3.6 it works)

See attachments to test

-- 
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to