Remove redundant modifiers

This commit is contained in:
Phillip Webb
2015-09-08 15:06:44 -07:00
parent 460ca75fce
commit e07df7e4c6
210 changed files with 325 additions and 325 deletions

View File

@@ -30,7 +30,7 @@ final class Dependency {
private final String description;
public Dependency(String id, String name, String description) {
Dependency(String id, String name, String description) {
this.id = id;
this.name = name;
this.description = description;

View File

@@ -66,7 +66,7 @@ class InitializrService {
*/
private CloseableHttpClient http;
public InitializrService() {
InitializrService() {
}
InitializrService(CloseableHttpClient http) {

View File

@@ -59,13 +59,13 @@ class InitializrServiceMetadata {
* Creates a new instance using the specified root {@link JSONObject}.
* @param root the root JSONObject
*/
public InitializrServiceMetadata(JSONObject root) {
InitializrServiceMetadata(JSONObject root) {
this.dependencies = parseDependencies(root);
this.projectTypes = parseProjectTypes(root);
this.defaults = Collections.unmodifiableMap(parseDefaults(root));
}
public InitializrServiceMetadata(ProjectType defaultProjectType) {
InitializrServiceMetadata(ProjectType defaultProjectType) {
this.dependencies = new HashMap<String, Dependency>();
this.projectTypes = new MetadataHolder<String, ProjectType>();
this.projectTypes.getContent()

View File

@@ -32,7 +32,7 @@ class ProjectGenerationResponse {
private String fileName;
public ProjectGenerationResponse(ContentType contentType) {
ProjectGenerationResponse(ContentType contentType) {
this.contentType = contentType;
}

View File

@@ -39,7 +39,7 @@ class ProjectGenerator {
private final InitializrService initializrService;
public ProjectGenerator(InitializrService initializrService) {
ProjectGenerator(InitializrService initializrService) {
this.initializrService = initializrService;
}

View File

@@ -38,7 +38,7 @@ class ProjectType {
private final Map<String, String> tags = new HashMap<String, String>();
public ProjectType(String id, String name, String action, boolean defaultType,
ProjectType(String id, String name, String action, boolean defaultType,
Map<String, String> tags) {
this.id = id;
this.name = name;

View File

@@ -41,7 +41,7 @@ class GroovyGrabDependencyResolver implements DependencyResolver {
private final GroovyCompilerConfiguration configuration;
public GroovyGrabDependencyResolver(GroovyCompilerConfiguration configuration) {
GroovyGrabDependencyResolver(GroovyCompilerConfiguration configuration) {
this.configuration = configuration;
}

View File

@@ -46,13 +46,13 @@ class Installer {
private final Properties installCounts;
public Installer(OptionSet options, CompilerOptionHandler compilerOptionHandler)
Installer(OptionSet options, CompilerOptionHandler compilerOptionHandler)
throws IOException {
this(new GroovyGrabDependencyResolver(createCompilerConfiguration(options,
compilerOptionHandler)));
}
public Installer(DependencyResolver resolver) throws IOException {
Installer(DependencyResolver resolver) throws IOException {
this.dependencyResolver = resolver;
this.installCounts = loadInstallCounts();
}

View File

@@ -136,7 +136,7 @@ class ResourceMatcher {
private final File rootFolder;
public FolderResourceLoader(File root) throws MalformedURLException {
FolderResourceLoader(File root) throws MalformedURLException {
super(new FolderClassLoader(root));
this.rootFolder = root;
}
@@ -153,7 +153,7 @@ class ResourceMatcher {
*/
private static class FolderClassLoader extends URLClassLoader {
public FolderClassLoader(File rootFolder) throws MalformedURLException {
FolderClassLoader(File rootFolder) throws MalformedURLException {
super(new URL[] { rootFolder.toURI().toURL() });
}

View File

@@ -180,7 +180,7 @@ public class OptionHandler {
private final String description;
public OptionHelpAdapter(OptionDescriptor descriptor) {
OptionHelpAdapter(OptionDescriptor descriptor) {
this.options = new LinkedHashSet<String>();
for (String option : descriptor.options()) {
this.options.add((option.length() == 1 ? "-" : "--") + option);

View File

@@ -117,7 +117,7 @@ public class RunCommand extends OptionParsingCommand {
OptionSetGroovyCompilerConfiguration implements
SpringApplicationRunnerConfiguration {
public SpringApplicationRunnerConfigurationAdapter(OptionSet options,
SpringApplicationRunnerConfigurationAdapter(OptionSet options,
CompilerOptionHandler optionHandler,
List<RepositoryConfiguration> repositoryConfiguration) {
super(options, optionHandler, repositoryConfiguration);

View File

@@ -62,9 +62,8 @@ public class SpringApplicationRunner {
* @param sources the files to compile/watch
* @param args input arguments
*/
public SpringApplicationRunner(
final SpringApplicationRunnerConfiguration configuration, String[] sources,
String... args) {
SpringApplicationRunner(final SpringApplicationRunnerConfiguration configuration,
String[] sources, String... args) {
this.configuration = configuration;
this.sources = sources.clone();
this.args = args.clone();
@@ -143,7 +142,7 @@ public class SpringApplicationRunner {
* Create a new {@link RunThread} instance.
* @param compiledSources the sources to launch
*/
public RunThread(Object... compiledSources) {
RunThread(Object... compiledSources) {
super("runner-" + (runnerCounter++));
this.compiledSources = compiledSources;
if (compiledSources.length != 0 && compiledSources[0] instanceof Class) {
@@ -195,7 +194,7 @@ public class SpringApplicationRunner {
private List<File> sources;
public FileWatchThread() {
FileWatchThread() {
super("filewatcher-" + (watcherCounter++));
this.previous = 0;
this.sources = getSourceFiles();

View File

@@ -31,7 +31,7 @@ class ClearCommand extends AbstractCommand {
private final ConsoleReader consoleReader;
public ClearCommand(ConsoleReader consoleReader) {
ClearCommand(ConsoleReader consoleReader) {
super("clear", "Clear the screen");
this.consoleReader = consoleReader;
}

View File

@@ -126,7 +126,7 @@ public class CommandCompleter extends StringsCompleter {
private final String usage;
public OptionHelpLine(OptionHelp optionHelp) {
OptionHelpLine(OptionHelp optionHelp) {
StringBuffer options = new StringBuffer();
for (String option : optionHelp.getOptions()) {
options.append(options.length() == 0 ? "" : ", ");

View File

@@ -27,7 +27,7 @@ import org.springframework.boot.cli.command.status.ExitStatus;
*/
class ExitCommand extends AbstractCommand {
public ExitCommand() {
ExitCommand() {
super("exit", "Quit the embedded shell");
}

View File

@@ -37,7 +37,7 @@ class ForkProcessCommand extends RunProcessCommand {
private final Command command;
public ForkProcessCommand(Command command) {
ForkProcessCommand(Command command) {
super(new JavaExecutable().toString());
this.command = command;
}

View File

@@ -37,7 +37,7 @@ class RunProcessCommand extends AbstractCommand {
private volatile RunProcess process;
public RunProcessCommand(String... command) {
RunProcessCommand(String... command) {
super(null, null);
this.command = command;
}

View File

@@ -67,7 +67,7 @@ public class Shell {
* Create a new {@link Shell} instance.
* @throws IOException
*/
public Shell() throws IOException {
Shell() throws IOException {
attachSignalHandler();
this.consoleReader = new ConsoleReader();
this.commandRunner = createCommandRunner();
@@ -194,7 +194,7 @@ public class Shell {
private final Map<String, String> aliases = new HashMap<String, String>();
public ShellCommandRunner() {
ShellCommandRunner() {
super(null);
}

View File

@@ -64,7 +64,7 @@ public class TestCommand extends OptionParsingCommand {
private class TestRunnerConfigurationAdapter extends
OptionSetGroovyCompilerConfiguration implements TestRunnerConfiguration {
public TestRunnerConfigurationAdapter(OptionSet options,
TestRunnerConfigurationAdapter(OptionSet options,
CompilerOptionHandler optionHandler) {
super(options, optionHandler);
}

View File

@@ -47,8 +47,7 @@ public class TestRunner {
* @param sources
* @param args
*/
public TestRunner(TestRunnerConfiguration configuration, String[] sources,
String[] args) {
TestRunner(TestRunnerConfiguration configuration, String[] sources, String[] args) {
this.sources = sources.clone();
this.compiler = new GroovyCompiler(configuration);
}
@@ -90,7 +89,7 @@ public class TestRunner {
* Create a new {@link RunThread} instance.
* @param sources the sources to launch
*/
public RunThread(Object... sources) {
RunThread(Object... sources) {
super("testrunner");
setDaemon(true);
if (sources.length != 0 && sources[0] instanceof Class) {

View File

@@ -118,7 +118,7 @@ public abstract class AnnotatedNodeASTTransformation implements ASTTransformatio
private final SourceUnit source;
public ClassVisitor(SourceUnit source) {
ClassVisitor(SourceUnit source) {
this.source = source;
}

View File

@@ -176,7 +176,7 @@ public class ExtendedGroovyClassLoader extends GroovyClassLoader {
private final URLClassLoader groovyOnlyClassLoader;
public DefaultScopeParentClassLoader(ClassLoader parent) {
DefaultScopeParentClassLoader(ClassLoader parent) {
super(parent);
this.groovyOnlyClassLoader = new URLClassLoader(getGroovyJars(parent), null);
}

View File

@@ -61,12 +61,16 @@ public class GroovyBeansTransformation implements ASTTransformation {
private class ClassVisitor extends ClassCodeVisitorSupport {
private static final String SOURCE_INTERFACE = "org.springframework.boot.BeanDefinitionLoader.GroovyBeanDefinitionSource";
private static final String BEANS = "beans";
private final SourceUnit source;
private final ClassNode classNode;
private boolean xformed = false;
public ClassVisitor(SourceUnit source, ClassNode classNode) {
ClassVisitor(SourceUnit source, ClassNode classNode) {
this.source = source;
this.classNode = classNode;
}
@@ -105,5 +109,7 @@ public class GroovyBeansTransformation implements ASTTransformation {
private ClosureExpression beans(BlockStatement block) {
return AstUtils.getClosure(block, BEANS, true);
}
}
}

View File

@@ -265,7 +265,7 @@ public class GroovyCompiler {
*/
private class CompilerAutoConfigureCustomizer extends CompilationCustomizer {
public CompilerAutoConfigureCustomizer() {
CompilerAutoConfigureCustomizer() {
super(CompilePhase.CONVERSION);
}

View File

@@ -106,9 +106,11 @@ public class MavenSettingsReader {
private class SpringBootSecDispatcher extends DefaultSecDispatcher {
public SpringBootSecDispatcher() {
this._configurationFile = new File(MavenSettingsReader.this.homeDir,
".m2/settings-security.xml").getAbsolutePath();
private static final String SECURITY_XML = ".m2/settings-security.xml";
SpringBootSecDispatcher() {
File file = new File(MavenSettingsReader.this.homeDir, SECURITY_XML);
this._configurationFile = file.getAbsolutePath();
try {
this._cipher = new DefaultPlexusCipher();
}

View File

@@ -33,8 +33,7 @@ class SmartImportCustomizer extends ImportCustomizer {
private SourceUnit source;
public SmartImportCustomizer(SourceUnit source, GeneratorContext context,
ClassNode classNode) {
SmartImportCustomizer(SourceUnit source, GeneratorContext context, ClassNode classNode) {
this.source = source;
}

View File

@@ -48,10 +48,10 @@ final class SummaryProgressReporter implements ProgressReporter {
private boolean finished;
public SummaryProgressReporter(DefaultRepositorySystemSession session, PrintStream out) {
SummaryProgressReporter(DefaultRepositorySystemSession session, PrintStream out) {
this.out = out;
session.setTransferListener(new AbstractTransferListener() {
@Override
public void transferStarted(TransferEvent event)
throws TransferCancelledException {
@@ -63,13 +63,15 @@ final class SummaryProgressReporter implements ProgressReporter {
throws TransferCancelledException {
reportProgress();
}
});
});
session.setRepositoryListener(new AbstractRepositoryListener() {
@Override
public void artifactResolved(RepositoryEvent event) {
reportProgress();
}
});
}

View File

@@ -151,7 +151,7 @@ public abstract class ResourceUtils {
private final FileSystemResourceLoader files;
public FileSearchResourceLoader(ClassLoader classLoader) {
FileSearchResourceLoader(ClassLoader classLoader) {
super(classLoader);
this.files = new FileSystemResourceLoader();
}