From 109973079b4e7c9d6dd290ae775a7698cb0c8258 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 1 Aug 2018 10:01:38 +0200 Subject: [PATCH] Polishing. See gh-275. --- .../vault/authentication/AuthenticationSteps.java | 14 +++++++++++--- .../AuthenticationStepsExecutorUnitTests.java | 1 + 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/spring-vault-core/src/main/java/org/springframework/vault/authentication/AuthenticationSteps.java b/spring-vault-core/src/main/java/org/springframework/vault/authentication/AuthenticationSteps.java index d021be9a..14fa26f6 100644 --- a/spring-vault-core/src/main/java/org/springframework/vault/authentication/AuthenticationSteps.java +++ b/spring-vault-core/src/main/java/org/springframework/vault/authentication/AuthenticationSteps.java @@ -149,6 +149,12 @@ public class AuthenticationSteps { this.steps = getChain(pathAware); } + /** + * Return a {@link List} of node given a {@link PathAware} starting point. + * + * @param pathAware must not be {@literal null}. + * @return + */ static List> getChain(PathAware pathAware) { List> steps = new ArrayList<>(); @@ -499,7 +505,7 @@ public class AuthenticationSteps { @NonNull List> right; - public ZipStep(Node left, PathAware right) { + ZipStep(Node left, PathAware right) { this.left = left; this.right = getChain(right); } @@ -522,6 +528,7 @@ public class AuthenticationSteps { @NonNull Consumer consumer; + @NonNull Node previous; @@ -543,6 +550,7 @@ public class AuthenticationSteps { @NonNull Supplier supplier; + @NonNull Node previous; @@ -581,8 +589,8 @@ public class AuthenticationSteps { /** * Create a new {@link Pair} given {@code left} and {@code right} values. * - * @param left - * @param right + * @param left the left value. + * @param right the right value. * @return the {@link Pair}. */ public static Pair of(L left, R right) { diff --git a/spring-vault-core/src/test/java/org/springframework/vault/authentication/AuthenticationStepsExecutorUnitTests.java b/spring-vault-core/src/test/java/org/springframework/vault/authentication/AuthenticationStepsExecutorUnitTests.java index 8d7d16ad..9dd6439f 100644 --- a/spring-vault-core/src/test/java/org/springframework/vault/authentication/AuthenticationStepsExecutorUnitTests.java +++ b/spring-vault-core/src/test/java/org/springframework/vault/authentication/AuthenticationStepsExecutorUnitTests.java @@ -51,6 +51,7 @@ import static org.springframework.vault.authentication.AuthenticationSteps.HttpR public class AuthenticationStepsExecutorUnitTests { private RestTemplate restTemplate; + private MockRestServiceServer mockRest; @Before