Author: tilman
Date: Wed Jan 7 06:06:46 2026
New Revision: 1931166
Log:
PDFBOX-5660: optimize, as suggested by Valery Bokov; closes #392
Modified:
pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripperByArea.java
Modified:
pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripperByArea.java
==============================================================================
---
pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripperByArea.java
Wed Jan 7 05:51:03 2026 (r1931165)
+++
pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripperByArea.java
Wed Jan 7 06:06:46 2026 (r1931166)
@@ -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<>();
+ ArrayList<List<TextPosition>> regionCharactersByArticle = new
ArrayList<>(1);
regionCharactersByArticle.add(new ArrayList<>());
regionCharacterList.put( regionName, regionCharactersByArticle );
regionText.put( regionName, new StringWriter() );