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

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 3c011c9cc2e6d1ba986dadb13e8a5a6c77f7736c
Author: Otavio Rodolfo Piske <[email protected]>
AuthorDate: Thu Jan 5 09:52:21 2023 +0100

    (chores) camel-hashicorp-vault: removed unused exceptions
---
 .../hashicorp/vault/HashicorpVaultPropertiesFunction.java          | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git 
a/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultPropertiesFunction.java
 
b/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultPropertiesFunction.java
index f42b8b156c8..6e5d5a330a4 100644
--- 
a/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultPropertiesFunction.java
+++ 
b/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultPropertiesFunction.java
@@ -18,7 +18,6 @@ package org.apache.camel.component.hashicorp.vault;
 
 import java.util.Map;
 
-import com.fasterxml.jackson.core.JsonProcessingException;
 import org.apache.camel.CamelContext;
 import org.apache.camel.CamelContextAware;
 import org.apache.camel.RuntimeCamelException;
@@ -170,7 +169,7 @@ public class HashicorpVaultPropertiesFunction extends 
ServiceSupport implements
         if (key != null) {
             try {
                 returnValue = getSecretFromSource(key, subkey, defaultValue, 
version);
-            } catch (JsonProcessingException e) {
+            } catch (Exception e) {
                 throw new RuntimeCamelException("Something went wrong while 
recovering " + key + " from vault");
             }
         }
@@ -178,9 +177,7 @@ public class HashicorpVaultPropertiesFunction extends 
ServiceSupport implements
         return returnValue;
     }
 
-    private String getSecretFromSource(
-            String key, String subkey, String defaultValue, String version)
-            throws JsonProcessingException {
+    private String getSecretFromSource(String key, String subkey, String 
defaultValue, String version) {
         String returnValue = null;
         try {
             String completePath = engine + "/" + "data" + "/" + key;

Reply via email to