Skip to content

Commit c1d90d8

Browse files
committed
PDFBOX-6025: avoid ClassCastException
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1926691 13f79535-47bb-0310-9956-ffa450edef68
1 parent f70caf5 commit c1d90d8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ public PDEmbeddedFilesNameTreeNode( COSDictionary dic )
5050
@Override
5151
protected PDComplexFileSpecification convertCOSToPD( COSBase base ) throws IOException
5252
{
53+
if (!(base instanceof COSDictionary))
54+
{
55+
throw new IOException("dictionary expected here, but got " + base);
56+
}
5357
return new PDComplexFileSpecification( (COSDictionary)base );
5458
}
5559

0 commit comments

Comments
 (0)