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

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

commit 128c3d2d00999d0316e9d78646eb08f4c8538ad0
Author: Andrea Cosentino <[email protected]>
AuthorDate: Tue Jul 12 08:53:47 2022 +0200

    CAMEL-18208 - vault: allow to retrieve a specific secret version/revision - 
AWS Secret Manager
---
 .../aws/secretsmanager/SecretsManagerPropertiesFunction.java        | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/components/camel-aws/camel-aws-secrets-manager/src/main/java/org/apache/camel/component/aws/secretsmanager/SecretsManagerPropertiesFunction.java
 
b/components/camel-aws/camel-aws-secrets-manager/src/main/java/org/apache/camel/component/aws/secretsmanager/SecretsManagerPropertiesFunction.java
index 220b4efe864..8f80a37a080 100644
--- 
a/components/camel-aws/camel-aws-secrets-manager/src/main/java/org/apache/camel/component/aws/secretsmanager/SecretsManagerPropertiesFunction.java
+++ 
b/components/camel-aws/camel-aws-secrets-manager/src/main/java/org/apache/camel/component/aws/secretsmanager/SecretsManagerPropertiesFunction.java
@@ -162,8 +162,10 @@ public class SecretsManagerPropertiesFunction extends 
ServiceSupport implements
                 defaultValue = StringHelper.before(defaultValue, "@");
             }
         } else {
-            key = StringHelper.before(remainder, "@");
-            version = StringHelper.after(remainder, "@");
+            if (remainder.contains("@")) {
+                key = StringHelper.before(remainder, "@");
+                version = StringHelper.after(remainder, "@");
+            }
         }
 
         if (key != null) {

Reply via email to