pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1758819 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/AppearanceGeneratorHelper.java
Date Thu, 01 Sep 2016 17:40:56 GMT
Author: tilman
Date: Thu Sep  1 17:40:56 2016
New Revision: 1758819

URL: http://svn.apache.org/viewvc?rev=1758819&view=rev
Log:
PDFBOX-3479: avoid NPE if no rectangle in widget

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/AppearanceGeneratorHelper.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/AppearanceGeneratorHelper.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/AppearanceGeneratorHelper.java?rev=1758819&r1=1758818&r2=1758819&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/AppearanceGeneratorHelper.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/AppearanceGeneratorHelper.java
Thu Sep  1 17:40:56 2016
@@ -129,6 +129,10 @@ class AppearanceGeneratorHelper
                     appearanceStream = new PDAppearanceStream(field.getAcroForm().getDocument());
                     
                     PDRectangle rect = widget.getRectangle();
+                    if (rect == null)
+                    {
+                        throw new IOException("widget of field " + field.getFullyQualifiedName()
+ " has no rectangle");
+                    }
                     
                     // Calculate the entries for the bounding box and the transformation
matrix
                     // settings for the appearance stream



Mime
View raw message