You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2026/01/24 14:20:30 UTC

svn commit: r1931508 - pdfbox/branches/3.0/io/src/test/java/org/apache/pdfbox/io

Author: tilman
Date: Sat Jan 24 14:20:30 2026
New Revision: 1931508

Log:
PDFBOX-5660: close input, as suggested by Valery Bokov; closes #404

Modified:
   pdfbox/branches/3.0/io/src/test/java/org/apache/pdfbox/io/RandomAccessReadBufferTest.java

Modified: pdfbox/branches/3.0/io/src/test/java/org/apache/pdfbox/io/RandomAccessReadBufferTest.java
==============================================================================
--- pdfbox/branches/3.0/io/src/test/java/org/apache/pdfbox/io/RandomAccessReadBufferTest.java	Sat Jan 24 13:46:56 2026	(r1931507)
+++ pdfbox/branches/3.0/io/src/test/java/org/apache/pdfbox/io/RandomAccessReadBufferTest.java	Sat Jan 24 14:20:30 2026	(r1931508)
@@ -230,7 +230,8 @@ class RandomAccessReadBufferTest
             os.write(new byte[4096]);
         }
         assertEquals(4096, path.toFile().length());
-        try (RandomAccessRead rar = new RandomAccessReadBuffer(Files.newInputStream(path)))
+        try (InputStream is = Files.newInputStream(path);
+             RandomAccessRead rar = new RandomAccessReadBuffer(is))
         {
             assertEquals(0, rar.read());
         }