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/30 10:10:53 UTC

(tika) branch TIKA-4704-2 created (now 4b36f40560)

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

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


      at 4b36f40560 [TIKA-4704] close input

This branch includes the following new commits:

     new 4b36f40560 [TIKA-4704] close input

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] close input

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-2
in repository https://gitbox.apache.org/repos/asf/tika.git

commit 4b36f40560b051ccdac8b89261f68fc2ed3f9d9b
Author: Tilman Hausherr <ti...@snafu.de>
AuthorDate: Mon Mar 30 12:10:45 2026 +0200

    [TIKA-4704] close input
---
 .../apache/tika/parser/microsoft/ooxml/TruncatedOOXMLTest.java   | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/test/java/org/apache/tika/parser/microsoft/ooxml/TruncatedOOXMLTest.java b/tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/test/java/org/apache/tika/parser/microsoft/ooxml/TruncatedOOXMLTest.java
index 179f3106f4..e681109405 100644
--- a/tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/test/java/org/apache/tika/parser/microsoft/ooxml/TruncatedOOXMLTest.java
+++ b/tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/test/java/org/apache/tika/parser/microsoft/ooxml/TruncatedOOXMLTest.java
@@ -6,7 +6,7 @@
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -42,9 +42,11 @@ public class TruncatedOOXMLTest extends TikaTest {
 
     @Test
     public void testWordTrunc14435() throws Exception {
+        List<Metadata> metadataList;
         //this is only very slightly truncated
-        List<Metadata> metadataList =
-                getRecursiveMetadata(truncate("testWORD_various.docx", 14435), true);
+        try (InputStream is = truncate("testWORD_various.docx", 14435)) {
+            metadataList = getRecursiveMetadata(is, true);
+        }
         assertEquals(1, metadataList.size());
         Metadata metadata = metadataList.get(0);
         String content = metadata.get(TikaCoreProperties.TIKA_CONTENT);
@@ -55,7 +57,6 @@ public class TruncatedOOXMLTest extends TikaTest {
         assertContains("Suddenly some Japanese", content);
     }
 
-
     @Test
     public void testTruncation() throws Exception {