You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ti...@apache.org on 2026/03/31 11:44:05 UTC

(tika) branch TIKA-4704-6 created (now 017572a12b)

This is an automated email from the ASF dual-hosted git repository.

tilman pushed a change to branch TIKA-4704-6
in repository https://gitbox.apache.org/repos/asf/tika.git


      at 017572a12b [TIKA-4704] use TemporaryResources to avoid leak

This branch includes the following new commits:

     new 017572a12b [TIKA-4704] use TemporaryResources to avoid leak

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(tika) 01/01: [TIKA-4704] use TemporaryResources to avoid leak

Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tilman pushed a commit to branch TIKA-4704-6
in repository https://gitbox.apache.org/repos/asf/tika.git

commit 017572a12b551db84aed5b8986851bca0586899c
Author: Tilman Hausherr <ti...@snafu.de>
AuthorDate: Tue Mar 31 13:43:57 2026 +0200

    [TIKA-4704] use TemporaryResources to avoid leak
---
 .../src/test/java/org/apache/tika/detect/zip/ZipDetectionTest.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-zip-commons/src/test/java/org/apache/tika/detect/zip/ZipDetectionTest.java b/tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-zip-commons/src/test/java/org/apache/tika/detect/zip/ZipDetectionTest.java
index a00bd6420b..8bf7d62932 100644
--- a/tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-zip-commons/src/test/java/org/apache/tika/detect/zip/ZipDetectionTest.java
+++ b/tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-zip-commons/src/test/java/org/apache/tika/detect/zip/ZipDetectionTest.java
@@ -29,6 +29,7 @@ import org.junit.jupiter.api.Test;
 
 import org.apache.tika.TikaTest;
 import org.apache.tika.detect.Detector;
+import org.apache.tika.io.TemporaryResources;
 import org.apache.tika.io.TikaInputStream;
 import org.apache.tika.metadata.HttpHeaders;
 import org.apache.tika.metadata.Metadata;
@@ -79,7 +80,8 @@ public class ZipDetectionTest extends TikaTest {
 
         detector = new DefaultZipContainerDetector();
         //try on a file that isn't a TikaInputStream
-        try (InputStream is = new BufferedInputStream(Files.newInputStream(TikaInputStream.get(getStream("testJAR.jar")).getPath()))) {
+        try (TemporaryResources tmp = new TemporaryResources();
+            InputStream is = new BufferedInputStream(Files.newInputStream(TikaInputStream.get(getStream("testJAR.jar"), tmp, new Metadata()).getPath()))) {
             assertExpected(detector, is, "application/java-archive", expectedDigest);
         }