You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2014/04/22 15:28:41 UTC

[Bug 56444] New: NullPointerException on HSSFCell.getCellComment()

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

            Bug ID: 56444
           Summary: NullPointerException on HSSFCell.getCellComment()
           Product: POI
           Version: unspecified
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
          Assignee: dev@poi.apache.org
          Reporter: lionel.joye@renault.com

Created attachment 31546
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31546&action=edit
Java Class and Excel file to run the bug.

On some of my Excel files, POI throws a NulPointerException on
HSSFCell.getCellComment() method.

I have made a synthetic Excel file and a sunthetic Java class, which are in the
attachment, to present this bug.

-- 
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


[Bug 56444] NullPointerException on HSSFCell.getCellComment()

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56444

Lionel <li...@renault.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Lionel <li...@renault.com> ---
Ok, I'm sorry : you're right, I didn't think the cell before the last cell
could be null.

Thank you :-).

Lionel

-- 
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


[Bug 56444] NullPointerException on HSSFCell.getCellComment()

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56444

Nick Burch <ap...@gagravarr.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO
                 OS|                            |All

--- Comment #1 from Nick Burch <ap...@gagravarr.org> ---
Have you checked that the cell isn't null? Row.getCell(int) can return null if
the cell has never been used or styled - use the overloaded getting with a
MissingCellPolicy or check for null if you want your code to cope easily with
this

-- 
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