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

ndipiazza pushed a commit to branch tika-grpc-3x-features
in repository https://gitbox.apache.org/repos/asf/tika.git


The following commit(s) were added to refs/heads/tika-grpc-3x-features by this 
push:
     new 3513804fc TIKA-4252: fail when you should and get rid of empty catch
3513804fc is described below

commit 3513804fc42cfb501a612364aaf51911fcf86ccd
Author: Nicholas DiPiazza <[email protected]>
AuthorDate: Thu May 9 16:03:32 2024 -0500

    TIKA-4252: fail when you should and get rid of empty catch
---
 tika-pipes/tika-grpc/example-dockerfile/docker-build.sh               | 4 ++--
 .../src/main/java/org/apache/tika/pipes/grpc/TikaGrpcServerImpl.java  | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/tika-pipes/tika-grpc/example-dockerfile/docker-build.sh 
b/tika-pipes/tika-grpc/example-dockerfile/docker-build.sh
index 7f9934759..b8b2ff4c5 100644
--- a/tika-pipes/tika-grpc/example-dockerfile/docker-build.sh
+++ b/tika-pipes/tika-grpc/example-dockerfile/docker-build.sh
@@ -9,8 +9,8 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> 
/dev/null && pwd )
 TIKA_SRC_PATH=${SCRIPT_DIR}/../../..
 OUT_DIR=${TIKA_SRC_PATH}/tika-pipes/tika-grpc/target/tika-docker
 
-mvn clean install -DskipTests=true -f "${TIKA_SRC_PATH}"
-mvn dependency:copy-dependencies -f "${TIKA_SRC_PATH}/tika-pipes/tika-grpc"
+mvn clean install -DskipTests=true -f "${TIKA_SRC_PATH}" || exit
+mvn dependency:copy-dependencies -f "${TIKA_SRC_PATH}/tika-pipes/tika-grpc" || 
exit
 rm -rf "${OUT_DIR}"
 mkdir -p "${OUT_DIR}"
 
diff --git 
a/tika-pipes/tika-grpc/src/main/java/org/apache/tika/pipes/grpc/TikaGrpcServerImpl.java
 
b/tika-pipes/tika-grpc/src/main/java/org/apache/tika/pipes/grpc/TikaGrpcServerImpl.java
index ce298a1af..b69055822 100644
--- 
a/tika-pipes/tika-grpc/src/main/java/org/apache/tika/pipes/grpc/TikaGrpcServerImpl.java
+++ 
b/tika-pipes/tika-grpc/src/main/java/org/apache/tika/pipes/grpc/TikaGrpcServerImpl.java
@@ -195,6 +195,7 @@ class TikaGrpcServerImpl extends TikaGrpc.TikaImplBase {
                 try {
                     metadataJsonObject = 
OBJECT_MAPPER.readValue(request.getMetadataJson(), new TypeReference<>() {});
                 } catch (JsonProcessingException e) {
+                    metadataJsonObject = new HashMap<>();
                 }
             }
             for (Map.Entry<String, Object> entry : 
metadataJsonObject.entrySet()) {

Reply via email to