My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 142: PdfPView Null Pointer
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  jeff.johnston.mn@gmail.com
Closed:  Oct 2008


 
Project Member Reported by jeff.johnston.mn@gmail.com, Sep 8, 2008
I found out the cause of the null pointer.  Line 115 of PdfPView.java:

PdfPCell cell = new PdfPCell(new Paragraph(value.toString(),
FontFactory.getFont(FontFactory.HELVETICA, 12, Font.NORMAL)));

does not check if value object is null first.  If I have one of my
column to be "null", it causes NPE.  To work around this, I have to
check the null to empty string.

I suggest for next version, PdfPView.java should be enhanced so that
upon null, it sets it to empty string:

PdfPCell cell = new PdfPCell(new Paragraph(value==null? "" :
value.toString(), FontFactory.getFont(FontFactory.HELVETICA, 12,
Font.NORMAL)));
Oct 25, 2008
Project Member #1 jeff.johnston.mn@gmail.com
Fixed and will go out with the 2.4 release.
Status: Fixed

Powered by Google Project Hosting