Skip to content

Commit 055513d

Browse files
committed
PDFBOX-5660: optimize, as suggested by Valery Bokov; closes #223
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1927998 13f79535-47bb-0310-9956-ffa450edef68
1 parent 2253c57 commit 055513d

File tree

1 file changed

+3
-2
lines changed
  • pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/graphics

1 file changed

+3
-2
lines changed

pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/graphics/ClosePath.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,13 @@ public ClosePath(PDFGraphicsStreamEngine context)
4343
@Override
4444
public void process(Operator operator, List<COSBase> operands) throws IOException
4545
{
46-
if (getGraphicsContext().getCurrentPoint() == null)
46+
PDFGraphicsStreamEngine context = getGraphicsContext();
47+
if (context.getCurrentPoint() == null)
4748
{
4849
LOG.warn("ClosePath without initial MoveTo");
4950
return;
5051
}
51-
getGraphicsContext().closePath();
52+
context.closePath();
5253
}
5354

5455
@Override

0 commit comments

Comments
 (0)