pdfbox-commits mailing list archives

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

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

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

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



Mime
View raw message