Skip to content

Commit a71c567

Browse files
committed
PDFBOX-5660: set capacity for list, as suggested by Valery Bokov; closes #458
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1934563 13f79535-47bb-0310-9956-ffa450edef68
1 parent 1e5bee9 commit a71c567

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • pdfbox/src/main/java/org/apache/pdfbox/pdmodel

pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ public RandomAccessRead getContentsForRandomAccess()
304304
.filter(COSStream.class::isInstance) //
305305
.map(b -> (COSStream) b) //
306306
.collect(Collectors.toList());
307-
List<RandomAccessRead> inputStreams = new ArrayList<>();
307+
List<RandomAccessRead> inputStreams = new ArrayList<>(streams.size() * 2);
308308
streams.forEach(stream ->
309309
{
310310
try

0 commit comments

Comments
 (0)