From 6875da1a75accdf4233d28639fb2ad47f3a9c69d Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 16 Mar 2017 12:19:25 +0100 Subject: [PATCH] Polishing. Reformar code. --- .../vault/annotation/VaultPropertySource.java | 11 +- .../VaultPropertySourceRegistrar.java | 45 +++--- .../config/AbstractVaultConfiguration.java | 9 +- .../config/EnvironmentVaultConfiguration.java | 10 +- .../vault/core/VaultSysTemplate.java | 2 +- .../env/LeaseAwareVaultPropertySource.java | 4 +- .../core/lease/SecretLeaseContainer.java | 135 +++++++++--------- .../core/lease/SecretLeaseEventPublisher.java | 29 ++-- .../vault/core/lease/domain/package-info.java | 1 + .../BeforeSecretLeaseRevocationEvent.java | 3 +- .../vault/core/lease/event/package-info.java | 1 + .../vault/core/lease/package-info.java | 1 + .../vault/support/KeystoreUtil.java | 4 +- .../vault/support/VaultResponse.java | 2 - 14 files changed, 131 insertions(+), 126 deletions(-) diff --git a/spring-vault-core/src/main/java/org/springframework/vault/annotation/VaultPropertySource.java b/spring-vault-core/src/main/java/org/springframework/vault/annotation/VaultPropertySource.java index 9cfbd2b7..9cca5179 100644 --- a/spring-vault-core/src/main/java/org/springframework/vault/annotation/VaultPropertySource.java +++ b/spring-vault-core/src/main/java/org/springframework/vault/annotation/VaultPropertySource.java @@ -27,9 +27,9 @@ import org.springframework.context.annotation.Import; /** * Annotation providing a convenient and declarative mechanism for adding a - * {@link VaultPropertySource} to Spring's {@link org.springframework.core.env.Environment - * Environment}. To be used in conjunction with @{@link Configuration} classes. - *

Example usage

+ * {@link VaultPropertySource} to Spring's + * {@link org.springframework.core.env.Environment Environment}. To be used in conjunction + * with @{@link Configuration} classes.

Example usage

*

* Given a Vault path {@code secret/my-application} containing the configuration data pair * {@code database.password=mysecretpassword}, the following {@code @Configuration} class @@ -65,8 +65,9 @@ import org.springframework.context.annotation.Import; * ordering is difficult to predict. In such cases - and if overriding is important - it * is recommended that the user fall back to using the programmatic PropertySource API. * See {@link org.springframework.core.env.ConfigurableEnvironment - * ConfigurableEnvironment} and {@link org.springframework.core.env.MutablePropertySources - * MutablePropertySources} javadocs for details. + * ConfigurableEnvironment} and + * {@link org.springframework.core.env.MutablePropertySources MutablePropertySources} + * javadocs for details. * * @author Mark Paluch */ diff --git a/spring-vault-core/src/main/java/org/springframework/vault/annotation/VaultPropertySourceRegistrar.java b/spring-vault-core/src/main/java/org/springframework/vault/annotation/VaultPropertySourceRegistrar.java index 4a714d33..824cb908 100644 --- a/spring-vault-core/src/main/java/org/springframework/vault/annotation/VaultPropertySourceRegistrar.java +++ b/spring-vault-core/src/main/java/org/springframework/vault/annotation/VaultPropertySourceRegistrar.java @@ -53,8 +53,8 @@ import org.springframework.vault.core.util.PropertyTransformers; * * @author Mark Paluch */ -class VaultPropertySourceRegistrar - implements ImportBeanDefinitionRegistrar, BeanFactoryPostProcessor { +class VaultPropertySourceRegistrar implements ImportBeanDefinitionRegistrar, + BeanFactoryPostProcessor { @Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) @@ -63,15 +63,16 @@ class VaultPropertySourceRegistrar ConfigurableEnvironment env = beanFactory.getBean(ConfigurableEnvironment.class); MutablePropertySources propertySources = env.getPropertySources(); - registerPropertySources(beanFactory - .getBeansOfType( + registerPropertySources( + beanFactory.getBeansOfType( org.springframework.vault.core.env.VaultPropertySource.class) - .values(), propertySources); + .values(), propertySources); - registerPropertySources(beanFactory - .getBeansOfType( - org.springframework.vault.core.env.LeaseAwareVaultPropertySource.class) - .values(), propertySources); + registerPropertySources( + beanFactory + .getBeansOfType( + org.springframework.vault.core.env.LeaseAwareVaultPropertySource.class) + .values(), propertySources); } private void registerPropertySources( @@ -121,9 +122,8 @@ class VaultPropertySourceRegistrar "'vaultTemplateRef' in @EnableVaultPropertySource must not be empty"); PropertyTransformer propertyTransformer = StringUtils - .hasText(propertyNamePrefix) - ? PropertyTransformers.propertyNamePrefix(propertyNamePrefix) - : PropertyTransformers.noop(); + .hasText(propertyNamePrefix) ? PropertyTransformers + .propertyNamePrefix(propertyNamePrefix) : PropertyTransformers.noop(); for (String propertyPath : paths) { @@ -131,8 +131,8 @@ class VaultPropertySourceRegistrar continue; } - AbstractBeanDefinition beanDefinition = createBeanDefinition(ref, renewal, - propertyTransformer, propertyPath); + AbstractBeanDefinition beanDefinition = createBeanDefinition(ref, + renewal, propertyTransformer, propertyPath); registry.registerBeanDefinition("vaultPropertySource#" + counter, beanDefinition); @@ -148,20 +148,19 @@ class VaultPropertySourceRegistrar BeanDefinitionBuilder builder; if (isRenewable(renewal)) { - builder = BeanDefinitionBuilder.rootBeanDefinition( - org.springframework.vault.core.env.LeaseAwareVaultPropertySource.class); + builder = BeanDefinitionBuilder + .rootBeanDefinition(org.springframework.vault.core.env.LeaseAwareVaultPropertySource.class); - RequestedSecret requestedSecret = renewal == Renewal.ROTATE - ? RequestedSecret.rotating(propertyPath) - : RequestedSecret.renewable(propertyPath); + RequestedSecret requestedSecret = renewal == Renewal.ROTATE ? RequestedSecret + .rotating(propertyPath) : RequestedSecret.renewable(propertyPath); builder.addConstructorArgValue(propertyPath); builder.addConstructorArgReference("secretLeaseContainer"); builder.addConstructorArgValue(requestedSecret); } else { - builder = BeanDefinitionBuilder.rootBeanDefinition( - org.springframework.vault.core.env.VaultPropertySource.class); + builder = BeanDefinitionBuilder + .rootBeanDefinition(org.springframework.vault.core.env.VaultPropertySource.class); builder.addConstructorArgValue(propertyPath); builder.addConstructorArgReference(ref); @@ -186,8 +185,8 @@ class VaultPropertySourceRegistrar addAttributesIfNotNull(result, metadata.getAnnotationAttributes(annotationClassName, false)); - Map container = metadata - .getAnnotationAttributes(containerClassName, false); + Map container = metadata.getAnnotationAttributes( + containerClassName, false); if (container != null && container.containsKey("value")) { for (Map containedAttributes : (Map[]) container .get("value")) { diff --git a/spring-vault-core/src/main/java/org/springframework/vault/config/AbstractVaultConfiguration.java b/spring-vault-core/src/main/java/org/springframework/vault/config/AbstractVaultConfiguration.java index 455c8ea4..20ee52c9 100644 --- a/spring-vault-core/src/main/java/org/springframework/vault/config/AbstractVaultConfiguration.java +++ b/spring-vault-core/src/main/java/org/springframework/vault/config/AbstractVaultConfiguration.java @@ -73,9 +73,8 @@ public abstract class AbstractVaultConfiguration implements ApplicationContextAw */ @Bean public VaultTemplate vaultTemplate() { - return new VaultTemplate(vaultEndpoint(), - clientHttpRequestFactoryWrapper().getClientHttpRequestFactory(), - sessionManager()); + return new VaultTemplate(vaultEndpoint(), clientHttpRequestFactoryWrapper() + .getClientHttpRequestFactory(), sessionManager()); } /** @@ -170,8 +169,8 @@ public abstract class AbstractVaultConfiguration implements ApplicationContextAw */ @Bean public ClientFactoryWrapper clientHttpRequestFactoryWrapper() { - return new ClientFactoryWrapper(ClientHttpRequestFactoryFactory - .create(clientOptions(), sslConfiguration())); + return new ClientFactoryWrapper(ClientHttpRequestFactoryFactory.create( + clientOptions(), sslConfiguration())); } /** diff --git a/spring-vault-core/src/main/java/org/springframework/vault/config/EnvironmentVaultConfiguration.java b/spring-vault-core/src/main/java/org/springframework/vault/config/EnvironmentVaultConfiguration.java index a21c70b6..3d19f193 100644 --- a/spring-vault-core/src/main/java/org/springframework/vault/config/EnvironmentVaultConfiguration.java +++ b/spring-vault-core/src/main/java/org/springframework/vault/config/EnvironmentVaultConfiguration.java @@ -31,7 +31,6 @@ import org.springframework.vault.authentication.AppRoleAuthentication; import org.springframework.vault.authentication.AppRoleAuthenticationOptions; import org.springframework.vault.authentication.AwsEc2Authentication; import org.springframework.vault.authentication.AwsEc2AuthenticationOptions; -import org.springframework.vault.authentication.AwsEc2AuthenticationOptions.AwsEc2AuthenticationOptionsBuilder; import org.springframework.vault.authentication.ClientAuthentication; import org.springframework.vault.authentication.ClientCertificateAuthentication; import org.springframework.vault.authentication.CubbyholeAuthentication; @@ -40,6 +39,7 @@ import org.springframework.vault.authentication.IpAddressUserId; import org.springframework.vault.authentication.MacAddressUserId; import org.springframework.vault.authentication.StaticUserId; import org.springframework.vault.authentication.TokenAuthentication; +import org.springframework.vault.authentication.AwsEc2AuthenticationOptions.AwsEc2AuthenticationOptionsBuilder; import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.support.SslConfiguration; import org.springframework.vault.support.VaultToken; @@ -133,8 +133,8 @@ import org.springframework.web.client.RestOperations; * @see CubbyholeAuthentication */ @Configuration -public class EnvironmentVaultConfiguration extends AbstractVaultConfiguration - implements ApplicationContextAware { +public class EnvironmentVaultConfiguration extends AbstractVaultConfiguration implements + ApplicationContextAware { private RestOperations cachedRestOperations; private ApplicationContext applicationContext; @@ -281,8 +281,8 @@ public class EnvironmentVaultConfiguration extends AbstractVaultConfiguration Assert.hasText(roleId, "Vault AWS EC2 authentication: RoleId (vault.aws-ec2.role-id) must not be empty"); - AwsEc2AuthenticationOptionsBuilder builder = AwsEc2AuthenticationOptions.builder() - .role(roleId); + AwsEc2AuthenticationOptionsBuilder builder = AwsEc2AuthenticationOptions + .builder().role(roleId); if (StringUtils.hasText(identityDocument)) { builder.identityDocumentUri(URI.create(identityDocument)); diff --git a/spring-vault-core/src/main/java/org/springframework/vault/core/VaultSysTemplate.java b/spring-vault-core/src/main/java/org/springframework/vault/core/VaultSysTemplate.java index f1abaa8e..045291cf 100644 --- a/spring-vault-core/src/main/java/org/springframework/vault/core/VaultSysTemplate.java +++ b/spring-vault-core/src/main/java/org/springframework/vault/core/VaultSysTemplate.java @@ -245,7 +245,7 @@ public class VaultSysTemplate implements VaultSysOperations { ResponseEntity exchange = restOperations.exchange(path, HttpMethod.GET, null, MOUNT_TYPE_REF, - Collections. emptyMap()); + Collections.emptyMap()); VaultMountsResponse body = exchange.getBody(); diff --git a/spring-vault-core/src/main/java/org/springframework/vault/core/env/LeaseAwareVaultPropertySource.java b/spring-vault-core/src/main/java/org/springframework/vault/core/env/LeaseAwareVaultPropertySource.java index 8d8da2e6..ff185e3f 100644 --- a/spring-vault-core/src/main/java/org/springframework/vault/core/env/LeaseAwareVaultPropertySource.java +++ b/spring-vault-core/src/main/java/org/springframework/vault/core/env/LeaseAwareVaultPropertySource.java @@ -50,8 +50,8 @@ import org.springframework.vault.support.JsonMapFlattener; * @see PropertyTransformer * @see PropertyTransformers */ -public class LeaseAwareVaultPropertySource - extends EnumerablePropertySource { +public class LeaseAwareVaultPropertySource extends + EnumerablePropertySource { private final static Log logger = LogFactory .getLog(LeaseAwareVaultPropertySource.class); diff --git a/spring-vault-core/src/main/java/org/springframework/vault/core/lease/SecretLeaseContainer.java b/spring-vault-core/src/main/java/org/springframework/vault/core/lease/SecretLeaseContainer.java index ab3d6abe..2a4941d1 100644 --- a/spring-vault-core/src/main/java/org/springframework/vault/core/lease/SecretLeaseContainer.java +++ b/spring-vault-core/src/main/java/org/springframework/vault/core/lease/SecretLeaseContainer.java @@ -20,8 +20,8 @@ import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; +import java.util.Map.Entry; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.ScheduledFuture; @@ -65,30 +65,30 @@ import org.springframework.web.client.RestOperations; * *

  * 
-SecretLeaseContainer container = new SecretLeaseContainer(vaultOperations,
-		taskScheduler);
-
-final RequestedSecret requestedSecret = container
-		.requestRotatingSecret("mysql/creds/my-role");
-container.addLeaseListener(new LeaseListenerAdapter() {
-	@Override
-	public void onLeaseEvent(LeaseEvent leaseEvent) {
-
-		if (requestedSecret == leaseEvent.getSource()) {
-
-			if (leaseEvent instanceof LeaseCreatedEvent) {
-
-			}
-
-			if (leaseEvent instanceof LeaseExpiredEvent) {
-
-			}
-		}
-	}
-});
-
-container.afterPropertiesSet();
-container.start(); // events are triggered after starting the container
+ * SecretLeaseContainer container = new SecretLeaseContainer(vaultOperations,
+ * 		taskScheduler);
+ *
+ * final RequestedSecret requestedSecret = container
+ * 		.requestRotatingSecret("mysql/creds/my-role");
+ * container.addLeaseListener(new LeaseListenerAdapter() {
+ * 	@Override
+ * 	public void onLeaseEvent(LeaseEvent leaseEvent) {
+ *
+ * 		if (requestedSecret == leaseEvent.getSource()) {
+ *
+ * 			if (leaseEvent instanceof LeaseCreatedEvent) {
+ *
+ * 			}
+ *
+ * 			if (leaseEvent instanceof LeaseExpiredEvent) {
+ *
+ * 			}
+ * 		}
+ * 	}
+ * });
+ *
+ * container.afterPropertiesSet();
+ * container.start(); // events are triggered after starting the container
  * 
  * 
*

@@ -115,8 +115,8 @@ container.start(); // events are triggered after starting the container * @see Lease */ @CommonsLog -public class SecretLeaseContainer extends SecretLeaseEventPublisher - implements InitializingBean, DisposableBean { +public class SecretLeaseContainer extends SecretLeaseEventPublisher implements + InitializingBean, DisposableBean { private final static AtomicIntegerFieldUpdater UPDATER = AtomicIntegerFieldUpdater .newUpdater(SecretLeaseContainer.class, "status"); @@ -337,8 +337,8 @@ public class SecretLeaseContainer extends SecretLeaseEventPublisher ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler(); scheduler.setDaemon(true); - scheduler.setThreadNamePrefix(String.format("%s-%d-", - getClass().getSimpleName(), poolId.incrementAndGet())); + scheduler.setThreadNamePrefix(String.format("%s-%d-", getClass() + .getSimpleName(), poolId.incrementAndGet())); scheduler.afterPropertiesSet(); this.taskScheduler = scheduler; @@ -346,8 +346,8 @@ public class SecretLeaseContainer extends SecretLeaseEventPublisher } for (RequestedSecret requestedSecret : requestedSecrets) { - this.renewals.put(requestedSecret, - new LeaseRenewalScheduler(this.taskScheduler)); + this.renewals.put(requestedSecret, new LeaseRenewalScheduler( + this.taskScheduler)); } } } @@ -457,8 +457,8 @@ public class SecretLeaseContainer extends SecretLeaseEventPublisher protected Lease doRenewLease(RequestedSecret requestedSecret, final Lease lease) { try { - ResponseEntity> entity = operations.doWithSession( - new RestOperationsCallback>>() { + ResponseEntity> entity = operations + .doWithSession(new RestOperationsCallback>>() { @Override @SuppressWarnings("unchecked") @@ -488,7 +488,8 @@ public class SecretLeaseContainer extends SecretLeaseEventPublisher onLeaseExpired(requestedSecret, lease); } - onError(requestedSecret, lease, + onError(requestedSecret, + lease, new VaultException(String.format("Cannot renew lease: %s", VaultResponses.getError(e.getResponseBodyAsString())))); } @@ -528,8 +529,8 @@ public class SecretLeaseContainer extends SecretLeaseEventPublisher onBeforeLeaseRevocation(requestedSecret, lease); - operations.doWithSession( - new RestOperationsCallback>>() { + operations + .doWithSession(new RestOperationsCallback>>() { @Override @SuppressWarnings("unchecked") @@ -544,7 +545,8 @@ public class SecretLeaseContainer extends SecretLeaseEventPublisher onAfterLeaseRevocation(requestedSecret, lease); } catch (HttpStatusCodeException e) { - onError(requestedSecret, lease, + onError(requestedSecret, + lease, new VaultException(String.format("Cannot revoke lease: %s", VaultResponses.getError(e.getResponseBodyAsString())))); } @@ -603,35 +605,38 @@ public class SecretLeaseContainer extends SecretLeaseEventPublisher cancelSchedule(currentLease); } - ScheduledFuture scheduledFuture = taskScheduler.schedule(new Runnable() { + ScheduledFuture scheduledFuture = taskScheduler.schedule( + new Runnable() { - @Override - public void run() { + @Override + public void run() { - try { + try { - schedules.remove(lease); + schedules.remove(lease); - if (currentLeaseRef.get() != lease) { - log.debug("Current lease has changed. Skipping renewal"); - return; + if (currentLeaseRef.get() != lease) { + log.debug("Current lease has changed. Skipping renewal"); + return; + } + + if (log.isDebugEnabled()) { + log.debug(String.format("Renewing lease %s", + lease.getLeaseId())); + } + + currentLeaseRef.compareAndSet(lease, + renewLease.renewLease(lease)); + } + catch (Exception e) { + log.error( + String.format("Cannot renew lease %s", + lease.getLeaseId()), e); + } } - - if (log.isDebugEnabled()) { - log.debug(String.format("Renewing lease %s", - lease.getLeaseId())); - } - - currentLeaseRef.compareAndSet(lease, - renewLease.renewLease(lease)); - } - catch (Exception e) { - log.error(String.format("Cannot renew lease %s", - lease.getLeaseId()), e); - } - } - }, new OneShotTrigger( - getRenewalSeconds(lease, minRenewalSeconds, expiryThresholdSeconds))); + }, + new OneShotTrigger(getRenewalSeconds(lease, minRenewalSeconds, + expiryThresholdSeconds))); schedules.put(lease, scheduledFuture); } @@ -667,8 +672,8 @@ public class SecretLeaseContainer extends SecretLeaseEventPublisher private long getRenewalSeconds(Lease lease, int minRenewalSeconds, int expiryThresholdSeconds) { - return Math.max(minRenewalSeconds, - lease.getLeaseDuration() - expiryThresholdSeconds); + return Math.max(minRenewalSeconds, lease.getLeaseDuration() + - expiryThresholdSeconds); } private boolean isLeaseRenewable(Lease lease) { @@ -705,8 +710,8 @@ public class SecretLeaseContainer extends SecretLeaseEventPublisher public Date nextExecutionTime(TriggerContext triggerContext) { if (UPDATER.compareAndSet(this, STATUS_ARMED, STATUS_FIRED)) { - return new Date( - System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(seconds)); + return new Date(System.currentTimeMillis() + + TimeUnit.SECONDS.toMillis(seconds)); } return null; diff --git a/spring-vault-core/src/main/java/org/springframework/vault/core/lease/SecretLeaseEventPublisher.java b/spring-vault-core/src/main/java/org/springframework/vault/core/lease/SecretLeaseEventPublisher.java index a44800c5..d68e4c0a 100644 --- a/spring-vault-core/src/main/java/org/springframework/vault/core/lease/SecretLeaseEventPublisher.java +++ b/spring-vault-core/src/main/java/org/springframework/vault/core/lease/SecretLeaseEventPublisher.java @@ -39,8 +39,8 @@ import org.springframework.vault.core.lease.event.SecretLeaseExpiredEvent; * Publisher for {@link SecretLeaseEvent}s. *

* This publisher dispatches events to {@link LeaseListener} and - * {@link LeaseErrorListener}. Instances are thread-safe once {@link #afterPropertiesSet() - * initialized}. + * {@link LeaseErrorListener}. Instances are thread-safe once + * {@link #afterPropertiesSet() initialized}. * * @author Mark Paluch * @see SecretLeaseEvent @@ -118,8 +118,8 @@ public class SecretLeaseEventPublisher implements InitializingBean { Map body) { for (LeaseListener leaseListener : leaseListeners) { - leaseListener.onLeaseEvent( - new SecretLeaseCreatedEvent(requestedSecret, lease, body)); + leaseListener.onLeaseEvent(new SecretLeaseCreatedEvent(requestedSecret, + lease, body)); } } @@ -134,8 +134,8 @@ public class SecretLeaseEventPublisher implements InitializingBean { protected void onAfterLeaseRenewed(RequestedSecret requestedSecret, Lease lease) { for (LeaseListener leaseListener : leaseListeners) { - leaseListener.onLeaseEvent( - new AfterSecretLeaseRenewedEvent(requestedSecret, lease)); + leaseListener.onLeaseEvent(new AfterSecretLeaseRenewedEvent(requestedSecret, + lease)); } } @@ -150,8 +150,8 @@ public class SecretLeaseEventPublisher implements InitializingBean { protected void onBeforeLeaseRevocation(RequestedSecret requestedSecret, Lease lease) { for (LeaseListener leaseListener : leaseListeners) { - leaseListener.onLeaseEvent( - new BeforeSecretLeaseRevocationEvent(requestedSecret, lease)); + leaseListener.onLeaseEvent(new BeforeSecretLeaseRevocationEvent( + requestedSecret, lease)); } } @@ -166,8 +166,8 @@ public class SecretLeaseEventPublisher implements InitializingBean { protected void onAfterLeaseRevocation(RequestedSecret requestedSecret, Lease lease) { for (LeaseListener leaseListener : leaseListeners) { - leaseListener.onLeaseEvent( - new AfterSecretLeaseRevocationEvent(requestedSecret, lease)); + leaseListener.onLeaseEvent(new AfterSecretLeaseRevocationEvent( + requestedSecret, lease)); } } @@ -199,8 +199,8 @@ public class SecretLeaseEventPublisher implements InitializingBean { protected void onError(RequestedSecret requestedSecret, Lease lease, Exception e) { for (LeaseErrorListener leaseErrorListener : leaseErrorListeners) { - leaseErrorListener.onLeaseError( - new SecretLeaseErrorEvent(requestedSecret, lease, e), e); + leaseErrorListener.onLeaseError(new SecretLeaseErrorEvent(requestedSecret, + lease, e), e); } } @@ -214,8 +214,9 @@ public class SecretLeaseEventPublisher implements InitializingBean { @Override public void onLeaseError(SecretLeaseEvent leaseEvent, Exception exception) { - log.warn(String.format("[%s] %s %s", leaseEvent.getSource(), - leaseEvent.getLease(), exception.getMessage()), exception); + log.warn( + String.format("[%s] %s %s", leaseEvent.getSource(), + leaseEvent.getLease(), exception.getMessage()), exception); } } } diff --git a/spring-vault-core/src/main/java/org/springframework/vault/core/lease/domain/package-info.java b/spring-vault-core/src/main/java/org/springframework/vault/core/lease/domain/package-info.java index 0cbd6d8e..7c156995 100644 --- a/spring-vault-core/src/main/java/org/springframework/vault/core/lease/domain/package-info.java +++ b/spring-vault-core/src/main/java/org/springframework/vault/core/lease/domain/package-info.java @@ -2,3 +2,4 @@ * Lease domain classes. */ package org.springframework.vault.core.lease.domain; + diff --git a/spring-vault-core/src/main/java/org/springframework/vault/core/lease/event/BeforeSecretLeaseRevocationEvent.java b/spring-vault-core/src/main/java/org/springframework/vault/core/lease/event/BeforeSecretLeaseRevocationEvent.java index 25d73097..04a0fb74 100644 --- a/spring-vault-core/src/main/java/org/springframework/vault/core/lease/event/BeforeSecretLeaseRevocationEvent.java +++ b/spring-vault-core/src/main/java/org/springframework/vault/core/lease/event/BeforeSecretLeaseRevocationEvent.java @@ -36,8 +36,7 @@ public class BeforeSecretLeaseRevocationEvent extends SecretLeaseEvent { * @param requestedSecret must not be {@literal null}. * @param lease must not be {@literal null}. */ - public BeforeSecretLeaseRevocationEvent(RequestedSecret requestedSecret, - Lease lease) { + public BeforeSecretLeaseRevocationEvent(RequestedSecret requestedSecret, Lease lease) { super(requestedSecret, lease); } } diff --git a/spring-vault-core/src/main/java/org/springframework/vault/core/lease/event/package-info.java b/spring-vault-core/src/main/java/org/springframework/vault/core/lease/event/package-info.java index c7d04fbb..d97bfdab 100644 --- a/spring-vault-core/src/main/java/org/springframework/vault/core/lease/event/package-info.java +++ b/spring-vault-core/src/main/java/org/springframework/vault/core/lease/event/package-info.java @@ -2,3 +2,4 @@ * Support classes for lease application events. */ package org.springframework.vault.core.lease.event; + diff --git a/spring-vault-core/src/main/java/org/springframework/vault/core/lease/package-info.java b/spring-vault-core/src/main/java/org/springframework/vault/core/lease/package-info.java index d049f1ed..a14efbc8 100644 --- a/spring-vault-core/src/main/java/org/springframework/vault/core/lease/package-info.java +++ b/spring-vault-core/src/main/java/org/springframework/vault/core/lease/package-info.java @@ -2,3 +2,4 @@ * The core package implementing lease renewal and secret rotation. */ package org.springframework.vault.core.lease; + diff --git a/spring-vault-core/src/main/java/org/springframework/vault/support/KeystoreUtil.java b/spring-vault-core/src/main/java/org/springframework/vault/support/KeystoreUtil.java index 8cea1640..fbbb9156 100644 --- a/spring-vault-core/src/main/java/org/springframework/vault/support/KeystoreUtil.java +++ b/spring-vault-core/src/main/java/org/springframework/vault/support/KeystoreUtil.java @@ -41,8 +41,8 @@ import java.util.List; class KeystoreUtil { /** - * Create a {@link KeyStore} containing the {@link KeySpec} and {@link X509Certificate - * certificates} using the given {@code keyAlias}. + * Create a {@link KeyStore} containing the {@link KeySpec} and + * {@link X509Certificate certificates} using the given {@code keyAlias}. * * @param keyAlias * @param certificates diff --git a/spring-vault-core/src/main/java/org/springframework/vault/support/VaultResponse.java b/spring-vault-core/src/main/java/org/springframework/vault/support/VaultResponse.java index bd04ae0e..2607ee84 100644 --- a/spring-vault-core/src/main/java/org/springframework/vault/support/VaultResponse.java +++ b/spring-vault-core/src/main/java/org/springframework/vault/support/VaultResponse.java @@ -18,8 +18,6 @@ package org.springframework.vault.support; import java.util.Map; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - /** * Value object to bind generic Vault HTTP API responses. *