Skip to content

Commit

Permalink
Fix NullPointerException
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximPlusov committed Jul 15, 2024
1 parent 49e7f8a commit 9e41c4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/verapdf/parser/SeekableCOSParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ protected COSObject getStream(COSObject dict) throws IOException {
long streamStartOffset = getSource().getOffset();

COSObject length = dict.getKey(ASAtom.LENGTH);
if (this.keyOfCurrentObject != null && length.isIndirect() && this.keyOfCurrentObject.equals(length.getKey())) {
if (this.keyOfCurrentObject != null && Boolean.TRUE.equals(length.isIndirect()) && this.keyOfCurrentObject.equals(length.getKey())) {
throw new VeraPDFParserException(getErrorMessage("Object has stream length value" +
" which references to its own object key"));
}
Expand Down

0 comments on commit 9e41c4f

Please sign in to comment.