Skip to content

Commit c4cad1d

Browse files
committed
Fix COSIndirect to COSStream casts
1 parent 3ae411a commit c4cad1d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/org/verapdf/cos/COSStream.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,8 @@ boolean equals(Object obj, List<COSBasePair> checkedObjects) {
318318
entry.getKey() == ASAtom.LENGTH) {
319319
continue;
320320
}
321-
COSBase cosBase = that.getKey(entry.getKey()).get();
322-
if (!entry.getValue().get().equals(cosBase, checkedObjects)) {
321+
COSBase cosBase = that.getKey(entry.getKey()).getDirectBase();
322+
if (!entry.getValue().getDirectBase().equals(cosBase, checkedObjects)) {
323323
return false;
324324
}
325325
}

src/test/java/org/verapdf/cos/COSStreamTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public void test() throws IOException {
4444
ASInputStream asciiHexStream = new ASMemoryInStream(asciiHexData);
4545
COSObject cosStream = COSStream.construct(asciiHexStream);
4646
cosStream.setKey(ASAtom.FILTER, COSName.construct(ASAtom.ASCII_HEX_DECODE));
47-
((COSStream) cosStream.get()).setFilters(new COSFilters(COSName.construct(ASAtom.FLATE_DECODE)));
47+
((COSStream) cosStream.getDirectBase()).setFilters(new COSFilters(COSName.construct(ASAtom.FLATE_DECODE)));
4848
byte[] buf = new byte[100];
4949
int read = cosStream.getData(COSStream.FilterFlags.DECODE).read(buf, 100);
5050
String message = new String(Arrays.copyOf(buf, read), StandardCharsets.ISO_8859_1);

0 commit comments

Comments
 (0)