Skip to content

Commit 3629c34

Browse files
committed
PDFBOX-6025: null is allowed
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1926700 13f79535-47bb-0310-9956-ffa450edef68
1 parent 0910eb9 commit 3629c34

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDEmbeddedFilesNameTreeNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public PDEmbeddedFilesNameTreeNode( COSDictionary dic )
4949
@Override
5050
protected PDComplexFileSpecification convertCOSToPD( COSBase base ) throws IOException
5151
{
52-
if (!(base instanceof COSDictionary))
52+
if (base != null && !(base instanceof COSDictionary))
5353
{
5454
throw new IOException("dictionary expected here, but got " + base);
5555
}

pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDStructureElementNameTreeNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public PDStructureElementNameTreeNode( COSDictionary dic )
5151
@Override
5252
protected PDStructureElement convertCOSToPD( COSBase base ) throws IOException
5353
{
54-
if (!(base instanceof COSDictionary))
54+
if (base != null && !(base instanceof COSDictionary))
5555
{
5656
throw new IOException("dictionary expected here, but got " + base);
5757
}

pdfbox/src/test/java/org/apache/pdfbox/pdmodel/common/PDIntegerNameTreeNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public PDIntegerNameTreeNode(COSDictionary dic)
4949
@Override
5050
protected COSInteger convertCOSToPD(COSBase base) throws IOException
5151
{
52-
if (!(base instanceof COSInteger))
52+
if (base != null && !(base instanceof COSInteger))
5353
{
5454
throw new IOException("integer expected here, but got " + base);
5555
}

0 commit comments

Comments
 (0)