diff --git a/spring-shell-standard/src/main/java/org/springframework/shell/standard/StandardParameterResolver.java b/spring-shell-standard/src/main/java/org/springframework/shell/standard/StandardParameterResolver.java index 629972b5..aa011891 100644 --- a/spring-shell-standard/src/main/java/org/springframework/shell/standard/StandardParameterResolver.java +++ b/spring-shell-standard/src/main/java/org/springframework/shell/standard/StandardParameterResolver.java @@ -109,9 +109,11 @@ public class StandardParameterResolver implements ParameterResolver { } @Override - public ValueResult resolve(MethodParameter methodParameter, List words) { + public ValueResult resolve(MethodParameter methodParameter, List wordsBuffer) { String prefix = prefixForMethod(methodParameter.getMethod()); + List words = wordsBuffer.stream().filter(w -> !w.isEmpty()).collect(Collectors.toList()); + CacheKey cacheKey = new CacheKey(methodParameter.getMethod(), words); Map resolved = parameterCache.computeIfAbsent(cacheKey, (k) -> {