From c05fc4449f73c23c98e54b0c1882762bd06bc156 Mon Sep 17 00:00:00 2001 From: Dmitry Kryukov Date: Fri, 2 Aug 2024 23:02:17 +0300 Subject: [PATCH 1/2] Need to use returned value of substring() --- tika-app/src/main/java/org/apache/tika/gui/TikaGUI.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tika-app/src/main/java/org/apache/tika/gui/TikaGUI.java b/tika-app/src/main/java/org/apache/tika/gui/TikaGUI.java index 6b1e659667..7549016f0d 100644 --- a/tika-app/src/main/java/org/apache/tika/gui/TikaGUI.java +++ b/tika-app/src/main/java/org/apache/tika/gui/TikaGUI.java @@ -613,9 +613,9 @@ private ImageSavingParser(Parser downstreamParser) { public File requestSave(String embeddedName) throws IOException { String suffix = ".tika"; - int splitAt = embeddedName.lastIndexOf('.'); + int splitAt = ebeddedNamem.lastIndexOf('.'); if (splitAt > 0) { - embeddedName.substring(splitAt); + ebeddedName = embeddedName.substring(splitAt); } File tmp = Files From 9eb5a5d40e765aad4579f05b2c5ee9c4f86d137a Mon Sep 17 00:00:00 2001 From: Dmitry Kryukov Date: Sat, 3 Aug 2024 15:16:48 +0300 Subject: [PATCH 2/2] fixed typos --- tika-app/src/main/java/org/apache/tika/gui/TikaGUI.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tika-app/src/main/java/org/apache/tika/gui/TikaGUI.java b/tika-app/src/main/java/org/apache/tika/gui/TikaGUI.java index 7549016f0d..30c02beedb 100644 --- a/tika-app/src/main/java/org/apache/tika/gui/TikaGUI.java +++ b/tika-app/src/main/java/org/apache/tika/gui/TikaGUI.java @@ -613,9 +613,9 @@ private ImageSavingParser(Parser downstreamParser) { public File requestSave(String embeddedName) throws IOException { String suffix = ".tika"; - int splitAt = ebeddedNamem.lastIndexOf('.'); + int splitAt = embeddedName.lastIndexOf('.'); if (splitAt > 0) { - ebeddedName = embeddedName.substring(splitAt); + embeddedName = embeddedName.substring(splitAt); } File tmp = Files