From f20b71a8c2e050d4fdea3140bbd36112c7dd12af Mon Sep 17 00:00:00 2001 From: Janne Valkealahti Date: Sat, 18 Dec 2021 16:17:10 +0000 Subject: [PATCH] Remove unused Parser usage --- .../shell/ApplicationRunnerAutoConfiguration.java | 4 ++-- .../shell/jline/InteractiveShellApplicationRunner.java | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/spring-shell-core/src/main/java/org/springframework/shell/ApplicationRunnerAutoConfiguration.java b/spring-shell-core/src/main/java/org/springframework/shell/ApplicationRunnerAutoConfiguration.java index 2c3eb38f..ed4fe057 100644 --- a/spring-shell-core/src/main/java/org/springframework/shell/ApplicationRunnerAutoConfiguration.java +++ b/spring-shell-core/src/main/java/org/springframework/shell/ApplicationRunnerAutoConfiguration.java @@ -46,8 +46,8 @@ public class ApplicationRunnerAutoConfiguration { @Bean @ConditionalOnProperty(prefix = SPRING_SHELL_INTERACTIVE, value = InteractiveShellApplicationRunner.ENABLED, havingValue = "true", matchIfMissing = true) - public ApplicationRunner interactiveApplicationRunner(Parser parser, Environment environment) { - return new InteractiveShellApplicationRunner(lineReader, promptProvider, parser, shell, environment); + public ApplicationRunner interactiveApplicationRunner(Environment environment) { + return new InteractiveShellApplicationRunner(lineReader, promptProvider, shell, environment); } @Bean diff --git a/spring-shell-core/src/main/java/org/springframework/shell/jline/InteractiveShellApplicationRunner.java b/spring-shell-core/src/main/java/org/springframework/shell/jline/InteractiveShellApplicationRunner.java index d681b021..289be2cc 100644 --- a/spring-shell-core/src/main/java/org/springframework/shell/jline/InteractiveShellApplicationRunner.java +++ b/spring-shell-core/src/main/java/org/springframework/shell/jline/InteractiveShellApplicationRunner.java @@ -19,7 +19,6 @@ package org.springframework.shell.jline; import java.util.Collections; import org.jline.reader.LineReader; -import org.jline.reader.Parser; import org.jline.reader.UserInterruptException; import org.jline.utils.AttributedString; @@ -62,16 +61,14 @@ public class InteractiveShellApplicationRunner implements ApplicationRunner { private final PromptProvider promptProvider; - private final Parser parser; - private final Shell shell; private final Environment environment; - public InteractiveShellApplicationRunner(LineReader lineReader, PromptProvider promptProvider, Parser parser, Shell shell, Environment environment) { + public InteractiveShellApplicationRunner(LineReader lineReader, PromptProvider promptProvider, Shell shell, + Environment environment) { this.lineReader = lineReader; this.promptProvider = promptProvider; - this.parser = parser; this.shell = shell; this.environment = environment; }