Skip to content

Commit f383393

Browse files
committed
PDFBOX-5660: refactor, as suggested by Valery Bokov; closes #227
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1928055 13f79535-47bb-0310-9956-ffa450edef68
1 parent 8569833 commit f383393

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFCloneUtility.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,10 @@ private void cloneMergeCOSBase(final COSBase source, final COSBase target) throw
210210
if (sourceBase instanceof COSArray && targetBase instanceof COSArray)
211211
{
212212
COSArray array = (COSArray) sourceBase;
213+
COSArray targetBaseArray = (COSArray) targetBase;
213214
for (int i = 0; i < array.size(); i++)
214215
{
215-
((COSArray) targetBase).add(cloneForNewDocument(array.get(i)));
216+
targetBaseArray.add(cloneForNewDocument(array.get(i)));
216217
}
217218
}
218219
else if (sourceBase instanceof COSDictionary && targetBase instanceof COSDictionary)

0 commit comments

Comments
 (0)