Author: tilman
Date: Wed Jan  7 06:06:55 2026
New Revision: 1931168

Log:
PDFBOX-5660: optimize, as suggested by Valery Bokov; closes #392

Modified:
   
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripperByArea.java

Modified: 
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripperByArea.java
==============================================================================
--- 
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripperByArea.java
  Wed Jan  7 06:06:51 2026        (r1931167)
+++ 
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripperByArea.java
  Wed Jan  7 06:06:55 2026        (r1931168)
@@ -117,7 +117,7 @@ public class PDFTextStripperByArea exten
             setStartPage(getCurrentPageNo());
             setEndPage(getCurrentPageNo());
             // reset the stored text for the region so this class can be 
reused.
-            ArrayList<List<TextPosition>> regionCharactersByArticle = new 
ArrayList<List<TextPosition>>();
+            ArrayList<List<TextPosition>> regionCharactersByArticle = new 
ArrayList<List<TextPosition>>(1);
             regionCharactersByArticle.add( new ArrayList<TextPosition>() );
             regionCharacterList.put( regionName, regionCharactersByArticle );
             regionText.put( regionName, new StringWriter() );

Reply via email to