Skip to content

Commit ee22c6e

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

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationPolygon.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ public float[][] getPath()
139139
if (array != null)
140140
{
141141
float[][] pathArray = new float[array.size()][];
142+
float[] emptyArray = new float[0];
142143
for (int i = 0; i < array.size(); ++i)
143144
{
144145
COSBase base2 = array.getObject(i);
@@ -148,7 +149,7 @@ public float[][] getPath()
148149
}
149150
else
150151
{
151-
pathArray[i] = new float[0];
152+
pathArray[i] = emptyArray;
152153
}
153154
}
154155
return pathArray;

0 commit comments

Comments
 (0)