Skip to content

Commit ab81aa5

Browse files
committed
PDFBOX-5660: simplify code
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1924361 13f79535-47bb-0310-9956-ffa450edef68
1 parent 8005b55 commit ab81aa5

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -482,10 +482,7 @@ private void endTextClip()
482482
// PDFBOX-4150: this is much faster than using textClippingArea.add(new Area(glyph))
483483
// https://stackoverflow.com/questions/21519007/fast-union-of-shapes-in-java
484484
GeneralPath path = new GeneralPath(Path2D.WIND_NON_ZERO, textClippings.size());
485-
for (Shape shape : textClippings)
486-
{
487-
path.append(shape, false);
488-
}
485+
textClippings.forEach(shape -> path.append(shape, false));
489486
state.intersectClippingPath(path);
490487
textClippings = new ArrayList<>();
491488

@@ -1608,11 +1605,7 @@ private boolean shouldSkipAnnotation(PDAnnotation annotation)
16081605
// of the standard annotation types and no annotation handler is available."
16091606
return true;
16101607
}
1611-
if (isHiddenOCG(annotation.getOptionalContent()))
1612-
{
1613-
return true;
1614-
}
1615-
return false;
1608+
return isHiddenOCG(annotation.getOptionalContent());
16161609
}
16171610

16181611
private boolean hasTransparency(PDFormXObject form) throws IOException

0 commit comments

Comments
 (0)