Make fields private where possible
This commit is contained in:
@@ -27,7 +27,7 @@ import java.util.Collection;
|
||||
*/
|
||||
public abstract class OptionParsingCommand extends AbstractCommand {
|
||||
|
||||
private OptionHandler handler;
|
||||
private final OptionHandler handler;
|
||||
|
||||
protected OptionParsingCommand(String name, String description, OptionHandler handler) {
|
||||
super(name, description);
|
||||
|
||||
@@ -33,9 +33,9 @@ import org.springframework.boot.cli.util.ResourceUtils;
|
||||
*/
|
||||
public class SourceOptions {
|
||||
|
||||
private List<String> sources;
|
||||
private final List<String> sources;
|
||||
|
||||
private List<?> args;
|
||||
private final List<?> args;
|
||||
|
||||
/**
|
||||
* Create a new {@link SourceOptions} instance.
|
||||
|
||||
@@ -30,7 +30,7 @@ class AnsiString {
|
||||
|
||||
private final Terminal terminal;
|
||||
|
||||
private StringBuilder value = new StringBuilder();
|
||||
private final StringBuilder value = new StringBuilder();
|
||||
|
||||
/**
|
||||
* Create a new {@link AnsiString} for the given {@link Terminal}.
|
||||
|
||||
@@ -44,9 +44,9 @@ public class CommandCompleter extends StringsCompleter {
|
||||
|
||||
private final Map<String, Completer> commandCompleters = new HashMap<String, Completer>();
|
||||
|
||||
private List<Command> commands = new ArrayList<Command>();
|
||||
private final List<Command> commands = new ArrayList<Command>();
|
||||
|
||||
private ConsoleReader console;
|
||||
private final ConsoleReader console;
|
||||
|
||||
public CommandCompleter(ConsoleReader consoleReader,
|
||||
ArgumentDelimiter argumentDelimiter, Iterable<Command> commands) {
|
||||
|
||||
@@ -62,13 +62,13 @@ public class Shell {
|
||||
|
||||
private static final String DEFAULT_PROMPT = "$ ";
|
||||
|
||||
private ShellCommandRunner commandRunner;
|
||||
private final ShellCommandRunner commandRunner;
|
||||
|
||||
private ConsoleReader consoleReader;
|
||||
private final ConsoleReader consoleReader;
|
||||
|
||||
private EscapeAwareWhiteSpaceArgumentDelimiter argumentDelimiter = new EscapeAwareWhiteSpaceArgumentDelimiter();
|
||||
private final EscapeAwareWhiteSpaceArgumentDelimiter argumentDelimiter = new EscapeAwareWhiteSpaceArgumentDelimiter();
|
||||
|
||||
private Stack<String> prompts = new Stack<String>();
|
||||
private final Stack<String> prompts = new Stack<String>();
|
||||
|
||||
/**
|
||||
* Create a new {@link Shell} instance.
|
||||
|
||||
@@ -65,7 +65,7 @@ public class GroovyBeansTransformation implements ASTTransformation {
|
||||
private static final String SOURCE_INTERFACE = "org.springframework.boot.BeanDefinitionLoader.GroovyBeanDefinitionSource";
|
||||
private static final String BEANS = "beans";
|
||||
private final SourceUnit source;
|
||||
private ClassNode classNode;
|
||||
private final ClassNode classNode;
|
||||
private boolean xformed = false;
|
||||
|
||||
public ClassVisitor(SourceUnit source, ClassNode classNode) {
|
||||
|
||||
Reference in New Issue
Block a user