pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1851182 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java
Date Sat, 12 Jan 2019 18:42:37 GMT
Author: tilman
Date: Sat Jan 12 18:42:37 2019
New Revision: 1851182

URL: http://svn.apache.org/viewvc?rev=1851182&view=rev
Log:
PDFBOX-4416: must copy because the map is read only

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java?rev=1851182&r1=1851181&r2=1851182&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java Sat
Jan 12 18:42:37 2019
@@ -944,6 +944,11 @@ public class PDFMergerUtility
         {
             names = new LinkedHashMap<>();
         }
+        else
+        {
+            // must copy because the map is read only
+            names = new LinkedHashMap<>(names);
+        }
         List<PDNameTreeNode<PDStructureElement>> kids = idTree.getKids();
         if (kids != null)
         {



Mime
View raw message