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
The following commit(s) were added to refs/heads/main by this push: new 028753b8888 Regen for commit 809281c9fcf028d5ae68d333502932930d445ebb 028753b8888 is described below commit 028753b888862a005667a61115b0cf6eec585bdf Author: oscerd <osc...@users.noreply.github.com> AuthorDate: Thu Jul 14 10:17:58 2022 +0000 Regen for commit 809281c9fcf028d5ae68d333502932930d445ebb Signed-off-by: GitHub <nore...@github.com> --- .../hashicorp/vault/HashicorpVaultProducer.java | 1 - .../vault/HashicorpVaultPropertiesFunction.java | 23 +++++++++++----------- .../HashicorpVaultPropertiesSourceNoEnvTestIT.java | 5 ++--- .../HashicorpVaultConfigurationProperties.java | 1 - 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultProducer.java b/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultProducer.java index bf9200f344e..edc7c5722cd 100644 --- a/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultProducer.java +++ b/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultProducer.java @@ -107,7 +107,6 @@ public class HashicorpVaultProducer extends DefaultProducer { exchange.getMessage().setBody(secretsList); } - @Override public HashicorpVaultEndpoint getEndpoint() { return (HashicorpVaultEndpoint) super.getEndpoint(); 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 d9607dda592..cc5b589125f 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 @@ -58,15 +58,15 @@ import org.springframework.vault.support.VaultResponse; * <p/> * * This implementation is to return the secret value associated with a key. The properties related to this kind of - * Properties Function are all prefixed with <tt>hashicorp:</tt>. For example asking for <tt>hashicorp:token</tt>, will return the - * secret value associated to the secret named token on Hashicorp Vault instance. + * Properties Function are all prefixed with <tt>hashicorp:</tt>. For example asking for <tt>hashicorp:token</tt>, will + * return the secret value associated to the secret named token on Hashicorp Vault instance. * - * Another way of retrieving a secret value is using the following notation <tt>hashicorp:database/username</tt>: in this case - * the field username of the secret database will be returned. As a fallback, the user could provide a default value, - * which will be returned in case the secret doesn't exist, the secret has been marked for deletion or, for example, if - * a particular field of the secret doesn't exist. For using this feature, the user could use the following notation - * <tt>aws:database/username:admin</tt>. The admin value will be returned as default value, if the conditions above were - * all met. + * Another way of retrieving a secret value is using the following notation <tt>hashicorp:database/username</tt>: in + * this case the field username of the secret database will be returned. As a fallback, the user could provide a default + * value, which will be returned in case the secret doesn't exist, the secret has been marked for deletion or, for + * example, if a particular field of the secret doesn't exist. For using this feature, the user could use the following + * notation <tt>aws:database/username:admin</tt>. The admin value will be returned as default value, if the conditions + * above were all met. */ @org.apache.camel.spi.annotations.PropertiesFunction("hashicorp") @@ -92,7 +92,8 @@ public class HashicorpVaultPropertiesFunction extends ServiceSupport implements String host = System.getenv(CAMEL_HASHICORP_VAULT_HOST_ENV); String port = System.getenv(CAMEL_HASHICORP_VAULT_PORT_ENV); String scheme = System.getenv(CAMEL_HASHICORP_VAULT_SCHEME_ENV); - if (ObjectHelper.isEmpty(token) && ObjectHelper.isEmpty(engine) && ObjectHelper.isEmpty(host) && ObjectHelper.isEmpty(port) && ObjectHelper.isEmpty(scheme)) { + if (ObjectHelper.isEmpty(token) && ObjectHelper.isEmpty(engine) && ObjectHelper.isEmpty(host) + && ObjectHelper.isEmpty(port) && ObjectHelper.isEmpty(scheme)) { HashicorpVaultConfiguration hashicorpVaultConfiguration = getCamelContext().getVaultConfiguration().hashicorp(); if (ObjectHelper.isNotEmpty(hashicorpVaultConfiguration)) { token = hashicorpVaultConfiguration.getToken(); @@ -102,7 +103,8 @@ public class HashicorpVaultPropertiesFunction extends ServiceSupport implements scheme = hashicorpVaultConfiguration.getScheme(); } } - if (ObjectHelper.isNotEmpty(token) && ObjectHelper.isNotEmpty(engine) && ObjectHelper.isNotEmpty(host) && ObjectHelper.isNotEmpty(port) && ObjectHelper.isNotEmpty(scheme)) { + if (ObjectHelper.isNotEmpty(token) && ObjectHelper.isNotEmpty(engine) && ObjectHelper.isNotEmpty(host) + && ObjectHelper.isNotEmpty(port) && ObjectHelper.isNotEmpty(scheme)) { VaultEndpoint vaultEndpoint = new VaultEndpoint(); vaultEndpoint.setHost(host); vaultEndpoint.setPort(Integer.parseInt(port)); @@ -220,4 +222,3 @@ public class HashicorpVaultPropertiesFunction extends ServiceSupport implements return camelContext; } } - diff --git a/components/camel-hashicorp-vault/src/test/java/org/apache/camel/component/hashicorp/vault/integration/HashicorpVaultPropertiesSourceNoEnvTestIT.java b/components/camel-hashicorp-vault/src/test/java/org/apache/camel/component/hashicorp/vault/integration/HashicorpVaultPropertiesSourceNoEnvTestIT.java index 8d71bd2dafe..b7b44f10328 100644 --- a/components/camel-hashicorp-vault/src/test/java/org/apache/camel/component/hashicorp/vault/integration/HashicorpVaultPropertiesSourceNoEnvTestIT.java +++ b/components/camel-hashicorp-vault/src/test/java/org/apache/camel/component/hashicorp/vault/integration/HashicorpVaultPropertiesSourceNoEnvTestIT.java @@ -20,7 +20,6 @@ import org.apache.camel.FailedToCreateRouteException; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.test.junit5.CamelTestSupport; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable; import org.junit.jupiter.api.condition.EnabledIfSystemProperties; import org.junit.jupiter.api.condition.EnabledIfSystemProperty; @@ -29,9 +28,9 @@ import static org.junit.jupiter.api.Assertions.assertThrows; // Must be manually tested. Provide your own accessKey and secretKey using -Dcamel.vault.hashicorp.token, -Dcamel.vault.hashicorp.engine, -Dcamel.vault.hashicorp.host, -Dcamel.vault.hashicorp.port and -Dcamel.vault.hashicorp.scheme @EnabledIfSystemProperties({ @EnabledIfSystemProperty(named = "camel.vault.hashicorp.token", matches = ".*", - disabledReason = "Token not provided"), + disabledReason = "Token not provided"), @EnabledIfSystemProperty(named = "camel.vault.hashicorp.engine", matches = ".*", - disabledReason = "Engine not provided"), + disabledReason = "Engine not provided"), @EnabledIfSystemProperty(named = "camel.vault.hashicorp.host", matches = ".*", disabledReason = "Host not provided"), @EnabledIfSystemProperty(named = "camel.vault.hashicorp.port", matches = ".*", disabledReason = "Port not provided"), @EnabledIfSystemProperty(named = "camel.vault.hashicorp.scheme", matches = ".*", disabledReason = "Scheme not provided") diff --git a/core/camel-main/src/main/java/org/apache/camel/main/HashicorpVaultConfigurationProperties.java b/core/camel-main/src/main/java/org/apache/camel/main/HashicorpVaultConfigurationProperties.java index 863542932c1..86d6423ea39 100644 --- a/core/camel-main/src/main/java/org/apache/camel/main/HashicorpVaultConfigurationProperties.java +++ b/core/camel-main/src/main/java/org/apache/camel/main/HashicorpVaultConfigurationProperties.java @@ -18,7 +18,6 @@ package org.apache.camel.main; import org.apache.camel.spi.BootstrapCloseable; import org.apache.camel.spi.Configurer; -import org.apache.camel.vault.AwsVaultConfiguration; import org.apache.camel.vault.HashicorpVaultConfiguration; /**