You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ta...@apache.org on 2025/10/22 12:17:00 UTC

(tika) branch TIKA-4515b created (now fba0d9c54)

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

tallison pushed a change to branch TIKA-4515b
in repository https://gitbox.apache.org/repos/asf/tika.git


      at fba0d9c54 TIKA-4515 bug fixes

This branch includes the following new commits:

     new fba0d9c54 TIKA-4515 bug fixes

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-4515 bug fixes

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

tallison pushed a commit to branch TIKA-4515b
in repository https://gitbox.apache.org/repos/asf/tika.git

commit fba0d9c54c4a434f907def65e5ce5ed2b62e1c93
Author: tallison <ta...@apache.org>
AuthorDate: Wed Oct 22 08:16:44 2025 -0400

    TIKA-4515 bug fixes
---
 .../src/main/java/org/apache/tika/async/cli/TikaAsyncCLI.java     | 2 +-
 .../java/org/apache/tika/async/cli/TikaConfigAsyncWriter.java     | 8 +++-----
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/tika-pipes/tika-async-cli/src/main/java/org/apache/tika/async/cli/TikaAsyncCLI.java b/tika-pipes/tika-async-cli/src/main/java/org/apache/tika/async/cli/TikaAsyncCLI.java
index 8dff25ab3..c2b4389d7 100644
--- a/tika-pipes/tika-async-cli/src/main/java/org/apache/tika/async/cli/TikaAsyncCLI.java
+++ b/tika-pipes/tika-async-cli/src/main/java/org/apache/tika/async/cli/TikaAsyncCLI.java
@@ -52,7 +52,7 @@ public class TikaAsyncCLI {
         options.addOption("i", "inputDir", true, "input directory");
         options.addOption("o", "outputDir", true, "output directory");
         options.addOption("n", "numClients", true, "number of forked clients");
-        options.addOption("X", "Xmx", true, "heap for the forked clients in usual jvm heap amount, e.g. -x 1g");
+        options.addOption("X", "Xmx", true, "heap for the forked clients in usual jvm heap amount, e.g. -X 1g");
         options.addOption("?", "help", false, "this help message");
         options.addOption("T", "timeoutMs", true, "timeout for each parse in milliseconds");
         options.addOption("h", "handlerType", true, "handler type: t=text, h=html, x=xml, b=body, i=ignore");
diff --git a/tika-pipes/tika-async-cli/src/main/java/org/apache/tika/async/cli/TikaConfigAsyncWriter.java b/tika-pipes/tika-async-cli/src/main/java/org/apache/tika/async/cli/TikaConfigAsyncWriter.java
index 7452a5877..18023d629 100644
--- a/tika-pipes/tika-async-cli/src/main/java/org/apache/tika/async/cli/TikaConfigAsyncWriter.java
+++ b/tika-pipes/tika-async-cli/src/main/java/org/apache/tika/async/cli/TikaConfigAsyncWriter.java
@@ -85,11 +85,9 @@ class TikaConfigAsyncWriter {
         Path baseInput = Paths.get(simpleAsyncConfig.getInputDir());
         Path baseOutput = Paths.get(simpleAsyncConfig.getOutputDir());
         if (Files.isRegularFile(baseInput)) {
-            if (baseInput.equals(baseOutput)) {
-                baseInput = baseInput.getParent();
-                baseOutput = baseInput;
-            } else {
-                baseInput = baseInput.getParent();
+            baseInput = baseInput.toAbsolutePath().getParent();
+            if (baseInput == null) {
+                throw new IllegalArgumentException("input file must be at least one directory below root");
             }
         }