From 3489d6ced6d89cf3b3de298e92b4226367fab72d Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 27 Aug 2018 15:38:24 +0200 Subject: [PATCH] Polishing. Add missing assertions. Javadoc. See gh-284. --- .../vault/authentication/AwsEc2Authentication.java | 2 +- .../vault/authentication/AwsEc2AuthenticationOptions.java | 4 +++- .../vault/authentication/AwsIamAuthentication.java | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/spring-vault-core/src/main/java/org/springframework/vault/authentication/AwsEc2Authentication.java b/spring-vault-core/src/main/java/org/springframework/vault/authentication/AwsEc2Authentication.java index a1826c86..4887e080 100644 --- a/spring-vault-core/src/main/java/org/springframework/vault/authentication/AwsEc2Authentication.java +++ b/spring-vault-core/src/main/java/org/springframework/vault/authentication/AwsEc2Authentication.java @@ -74,7 +74,7 @@ public class AwsEc2Authentication implements ClientAuthentication, /** * Create a new {@link AwsEc2Authentication} specifying * {@link AwsEc2AuthenticationOptions}, a Vault and an AWS-Metadata-specific - * {@link RestOperations} . + * {@link RestOperations}. * * @param options must not be {@literal null}. * @param vaultRestOperations must not be {@literal null}. diff --git a/spring-vault-core/src/main/java/org/springframework/vault/authentication/AwsEc2AuthenticationOptions.java b/spring-vault-core/src/main/java/org/springframework/vault/authentication/AwsEc2AuthenticationOptions.java index 96ed57ed..0b1e7057 100644 --- a/spring-vault-core/src/main/java/org/springframework/vault/authentication/AwsEc2AuthenticationOptions.java +++ b/spring-vault-core/src/main/java/org/springframework/vault/authentication/AwsEc2AuthenticationOptions.java @@ -151,13 +151,15 @@ public class AwsEc2AuthenticationOptions { /** * Configure the Identity Document {@link URI}. * - * @param identityDocumentUri must not be empty or {@literal null}. + * @param identityDocumentUri must not be {@literal null}. * @return {@code this} {@link AwsEc2AuthenticationOptionsBuilder}. * @see #DEFAULT_PKCS7_IDENTITY_DOCUMENT_URI */ public AwsEc2AuthenticationOptionsBuilder identityDocumentUri( URI identityDocumentUri) { + Assert.notNull(identityDocumentUri, "Identity document URI must not be null"); + this.identityDocumentUri = identityDocumentUri; return this; } diff --git a/spring-vault-core/src/main/java/org/springframework/vault/authentication/AwsIamAuthentication.java b/spring-vault-core/src/main/java/org/springframework/vault/authentication/AwsIamAuthentication.java index bab6b0c4..2258131c 100644 --- a/spring-vault-core/src/main/java/org/springframework/vault/authentication/AwsIamAuthentication.java +++ b/spring-vault-core/src/main/java/org/springframework/vault/authentication/AwsIamAuthentication.java @@ -83,7 +83,7 @@ public class AwsIamAuthentication implements ClientAuthentication { /** * Create a new {@link AwsIamAuthentication} specifying * {@link AwsIamAuthenticationOptions}, a Vault and an AWS-Metadata-specific - * {@link RestOperations} . + * {@link RestOperations}. * * @param options must not be {@literal null}. * @param vaultRestOperations must not be {@literal null}.