This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new bc111de9450a camel-main: fix infinite recursion in three
CyberArkVaultConfigurationProperties fluent setters (#29568)
bc111de9450a is described below
commit bc111de9450a205f031932d913a90f1750f5457e
Author: dhairya05 <[email protected]>
AuthorDate: Wed Nov 11 02:01:10 2026 +0530
camel-main: fix infinite recursion in three
CyberArkVaultConfigurationProperties fluent setters (#29568)
withApiKey, withVerifySSL and withCertificatePath called themselves instead
of the inherited setters, so each threw StackOverflowError. They now delegate
to setApiKey, setVerifySsl and setCertificatePath. Also fixes the class javadoc
(CyberArk Conjur, not Hashicorp) and covers the setters in MainVaultTest.
---
.../apache/camel/main/CyberArkVaultConfigurationProperties.java | 8 ++++----
.../src/test/java/org/apache/camel/main/MainVaultTest.java | 6 ++++++
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git
a/core/camel-main/src/main/java/org/apache/camel/main/CyberArkVaultConfigurationProperties.java
b/core/camel-main/src/main/java/org/apache/camel/main/CyberArkVaultConfigurationProperties.java
index 56e6c6d61d5e..054edcfa5068 100644
---
a/core/camel-main/src/main/java/org/apache/camel/main/CyberArkVaultConfigurationProperties.java
+++
b/core/camel-main/src/main/java/org/apache/camel/main/CyberArkVaultConfigurationProperties.java
@@ -21,7 +21,7 @@ import org.apache.camel.spi.Configurer;
import org.apache.camel.vault.CyberArkVaultConfiguration;
/**
- * Configuration for access to Hashicorp Vault Secret.
+ * Configuration for access to Cyberark Conjur Vault Secret.
*/
@Configurer(extended = true)
public class CyberArkVaultConfigurationProperties extends
CyberArkVaultConfiguration implements BootstrapCloseable {
@@ -93,7 +93,7 @@ public class CyberArkVaultConfigurationProperties extends
CyberArkVaultConfigura
* The Cyberark Conjur Vault Api Key
*/
public CyberArkVaultConfigurationProperties withApiKey(String apiKey) {
- withApiKey(apiKey);
+ setApiKey(apiKey);
return this;
}
@@ -101,7 +101,7 @@ public class CyberArkVaultConfigurationProperties extends
CyberArkVaultConfigura
* The Cyberark Conjur Vault Verify SSL setting
*/
public CyberArkVaultConfigurationProperties withVerifySSL(boolean
verifySSL) {
- withVerifySSL(verifySSL);
+ setVerifySsl(verifySSL);
return this;
}
@@ -109,7 +109,7 @@ public class CyberArkVaultConfigurationProperties extends
CyberArkVaultConfigura
* The Cyberark Conjur Vault Certificate Path
*/
public CyberArkVaultConfigurationProperties withCertificatePath(String
certificatePath) {
- withCertificatePath(certificatePath);
+ setCertificatePath(certificatePath);
return this;
}
diff --git
a/core/camel-main/src/test/java/org/apache/camel/main/MainVaultTest.java
b/core/camel-main/src/test/java/org/apache/camel/main/MainVaultTest.java
index e75df3a6eb07..3af0c74306fc 100644
--- a/core/camel-main/src/test/java/org/apache/camel/main/MainVaultTest.java
+++ b/core/camel-main/src/test/java/org/apache/camel/main/MainVaultTest.java
@@ -515,6 +515,9 @@ public class MainVaultTest {
main.configure().vault().cyberark()
.withAuthToken("token")
.withUrl("http://conjur.com")
+ .withApiKey("key")
+ .withVerifySSL(false)
+ .withCertificatePath("/tmp/ca.pem")
.end();
main.start();
@@ -527,6 +530,9 @@ public class MainVaultTest {
Assertions.assertEquals("token", cfg.getAuthToken());
Assertions.assertEquals("http://conjur.com", cfg.getUrl());
+ Assertions.assertEquals("key", cfg.getApiKey());
+ Assertions.assertFalse(cfg.isVerifySsl());
+ Assertions.assertEquals("/tmp/ca.pem", cfg.getCertificatePath());
main.stop();
}
}