From 7d408e1c964e2ddd572e24b201049be4e2a0b6fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Kolo=C5=A1njaji?= Date: Fri, 1 Oct 2021 14:28:24 +0200 Subject: [PATCH] Fix typos in `GcpIamAuthenticationOptions` and `GcpIamCredentialsAuthenticationOptions`. See gh-657 --- .../vault/authentication/GcpIamAuthenticationOptions.java | 4 ++-- .../GcpIamCredentialsAuthenticationOptions.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-vault-core/src/main/java/org/springframework/vault/authentication/GcpIamAuthenticationOptions.java b/spring-vault-core/src/main/java/org/springframework/vault/authentication/GcpIamAuthenticationOptions.java index be39a2f1..9db2045c 100644 --- a/spring-vault-core/src/main/java/org/springframework/vault/authentication/GcpIamAuthenticationOptions.java +++ b/spring-vault-core/src/main/java/org/springframework/vault/authentication/GcpIamAuthenticationOptions.java @@ -249,7 +249,7 @@ public class GcpIamAuthenticationOptions extends GcpIamAuthenticationSupport { */ public GcpIamAuthenticationOptionsBuilder jwtValidity(Duration jwtValidity) { - Assert.hasText(this.role, "JWT validity duration must not be null"); + Assert.notNull(jwtValidity, "JWT validity duration must not be null"); this.jwtValidity = jwtValidity; return this; @@ -263,7 +263,7 @@ public class GcpIamAuthenticationOptions extends GcpIamAuthenticationSupport { */ public GcpIamAuthenticationOptionsBuilder clock(Clock clock) { - Assert.hasText(this.role, "Clock must not be null"); + Assert.notNull(clock, "Clock must not be null"); this.clock = clock; return this; diff --git a/spring-vault-core/src/main/java/org/springframework/vault/authentication/GcpIamCredentialsAuthenticationOptions.java b/spring-vault-core/src/main/java/org/springframework/vault/authentication/GcpIamCredentialsAuthenticationOptions.java index cad61dd5..f989ce69 100644 --- a/spring-vault-core/src/main/java/org/springframework/vault/authentication/GcpIamCredentialsAuthenticationOptions.java +++ b/spring-vault-core/src/main/java/org/springframework/vault/authentication/GcpIamCredentialsAuthenticationOptions.java @@ -200,7 +200,7 @@ public class GcpIamCredentialsAuthenticationOptions extends GcpIamAuthentication */ public GcpIamCredentialsAuthenticationOptionsBuilder jwtValidity(Duration jwtValidity) { - Assert.hasText(this.role, "JWT validity duration must not be null"); + Assert.notNull(jwtValidity, "JWT validity duration must not be null"); this.jwtValidity = jwtValidity; return this; @@ -214,7 +214,7 @@ public class GcpIamCredentialsAuthenticationOptions extends GcpIamAuthentication */ public GcpIamCredentialsAuthenticationOptionsBuilder clock(Clock clock) { - Assert.hasText(this.role, "Clock must not be null"); + Assert.notNull(clock, "Clock must not be null"); this.clock = clock; return this;