| Issue 142: | PdfPView Null Pointer | |
| 1 person starred this issue and may be notified of changes. | Back to list |
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
Status:
Fixed
|