diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/AuthorizationExceptionMatcher.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/AuthorizationExceptionMatcher.java index 21a3e70f0366..fce89656dd44 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/AuthorizationExceptionMatcher.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/AuthorizationExceptionMatcher.java @@ -31,7 +31,7 @@ public final class AuthorizationExceptionMatcher { private AuthorizationExceptionMatcher() { } - public static Matcher withReason(final Reason reason) { + public static Matcher withReason(Reason reason) { return new CustomMatcher( "CloudFoundryAuthorizationException with " + reason + " reason") { diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnClassCondition.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnClassCondition.java index 75fbc5496961..6148dea91890 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnClassCondition.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnClassCondition.java @@ -252,7 +252,7 @@ private static final class ThreadedOutcomesResolver implements OutcomesResolver private volatile ConditionOutcome[] outcomes; - private ThreadedOutcomesResolver(final OutcomesResolver outcomesResolver) { + private ThreadedOutcomesResolver(OutcomesResolver outcomesResolver) { this.thread = new Thread( () -> this.outcomes = outcomesResolver.resolveOutcomes()); this.thread.start(); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/context/MessageSourceProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/context/MessageSourceProperties.java index 7f308c53375c..b11773fee457 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/context/MessageSourceProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/context/MessageSourceProperties.java @@ -110,7 +110,7 @@ public boolean isUseCodeAsDefaultMessage() { return this.useCodeAsDefaultMessage; } - public void setUseCodeAsDefaultMessage(final boolean useCodeAsDefaultMessage) { + public void setUseCodeAsDefaultMessage(boolean useCodeAsDefaultMessage) { this.useCodeAsDefaultMessage = useCodeAsDefaultMessage; } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/sendgrid/SendGridProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/sendgrid/SendGridProperties.java index d1492c31a29f..307060d8a2cf 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/sendgrid/SendGridProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/sendgrid/SendGridProperties.java @@ -42,7 +42,7 @@ public String getApiKey() { return this.apiKey; } - public void setApiKey(final String apiKey) { + public void setApiKey(String apiKey) { this.apiKey = apiKey; } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxAutoConfiguration.java index 8a8b4e97e1e1..a375227d1787 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxAutoConfiguration.java @@ -179,7 +179,7 @@ public void configureViewResolvers(ViewResolverRegistry registry) { } @Override - public void addFormatters(final FormatterRegistry registry) { + public void addFormatters(FormatterRegistry registry) { for (Converter converter : getBeansOfType(Converter.class)) { registry.addConverter(converter); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/DefaultServletWebServerFactoryCustomizer.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/DefaultServletWebServerFactoryCustomizer.java index d73e55390e94..975105945837 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/DefaultServletWebServerFactoryCustomizer.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/DefaultServletWebServerFactoryCustomizer.java @@ -411,7 +411,7 @@ private static void customizeStaticResources(Resource resource, private static class UndertowCustomizer { - protected static void customizeUndertow(final ServerProperties serverProperties, + protected static void customizeUndertow(ServerProperties serverProperties, Environment environment, UndertowServletWebServerFactory factory) { ServerProperties.Undertow undertowProperties = serverProperties.getUndertow(); @@ -478,7 +478,7 @@ private static void customizeMaxHttpPostSize( private static class JettyCustomizer { - public static void customizeJetty(final ServerProperties serverProperties, + public static void customizeJetty(ServerProperties serverProperties, Environment environment, JettyServletWebServerFactory factory) { ServerProperties.Jetty jettyProperties = serverProperties.getJetty(); factory.setUseForwardHeaders( diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WelcomePageHandlerMapping.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WelcomePageHandlerMapping.java index 95351d56b60d..f0b4baaf7046 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WelcomePageHandlerMapping.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WelcomePageHandlerMapping.java @@ -66,7 +66,7 @@ private boolean welcomeTemplateExists( applicationContext) != null; } - private void setRootViewName(final String viewName) { + private void setRootViewName(String viewName) { ParameterizableViewController controller = new ParameterizableViewController(); controller.setViewName(viewName); setRootHandler(controller); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jPropertiesTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jPropertiesTests.java index 4a61d58d7661..9511158f0f4b 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jPropertiesTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jPropertiesTests.java @@ -172,7 +172,7 @@ private static void assertCredentials(Configuration actual, String username, } } - public Neo4jProperties load(final boolean embeddedAvailable, String... environment) { + public Neo4jProperties load(boolean embeddedAvailable, String... environment) { AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(); ctx.setClassLoader(new URLClassLoader(new URL[0], getClass().getClassLoader()) { diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/artemis/ArtemisAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/artemis/ArtemisAutoConfigurationTests.java index 2d1a767f245d..4fd77e3bde16 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/artemis/ArtemisAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/artemis/ArtemisAutoConfigurationTests.java @@ -335,7 +335,7 @@ public void checkTopic(String name, boolean shouldExist) { checkDestination(name, true, shouldExist); } - public void checkDestination(final String name, final boolean pubSub, + public void checkDestination(String name, final boolean pubSub, final boolean shouldExist) { this.jmsTemplate.execute((SessionCallback) (session) -> { try { diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/websocket/servlet/WebSocketMessagingAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/websocket/servlet/WebSocketMessagingAutoConfigurationTests.java index a144d1404d57..dc2b038fccd8 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/websocket/servlet/WebSocketMessagingAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/websocket/servlet/WebSocketMessagingAutoConfigurationTests.java @@ -139,7 +139,7 @@ private List getDefaultConverters() { .getField(compositeDefaultConverter, "converters"); } - private Object performStompSubscription(final String topic) throws Throwable { + private Object performStompSubscription(String topic) throws Throwable { TestPropertyValues .of("server.port:0", "spring.jackson.serialization.indent-output:true") .applyTo(this.context); diff --git a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/core/HelpCommand.java b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/core/HelpCommand.java index 5a16d39f85d2..ea62820f2c82 100644 --- a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/core/HelpCommand.java +++ b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/core/HelpCommand.java @@ -59,7 +59,7 @@ public String getHelp() { @Override public Collection getOptionsHelp() { List help = new ArrayList<>(); - for (final Command command : this.commandRunner) { + for (Command command : this.commandRunner) { if (isHelpShown(command)) { help.add(new OptionHelp() { diff --git a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/run/SpringApplicationRunner.java b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/run/SpringApplicationRunner.java index 205c5cf4e80b..ca9cb7b984ee 100644 --- a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/run/SpringApplicationRunner.java +++ b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/run/SpringApplicationRunner.java @@ -65,7 +65,7 @@ public class SpringApplicationRunner { * @param sources the files to compile/watch * @param args input arguments */ - SpringApplicationRunner(final SpringApplicationRunnerConfiguration configuration, + SpringApplicationRunner(SpringApplicationRunnerConfiguration configuration, String[] sources, String... args) { this.configuration = configuration; this.sources = sources.clone(); diff --git a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyCustomizer.java b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyCustomizer.java index 7aac8085f2fa..8ba830ae8034 100644 --- a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyCustomizer.java +++ b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyCustomizer.java @@ -88,7 +88,7 @@ public String getVersion(String artifactId, String defaultVersion) { * @param classNames the class names to test * @return a nested {@link DependencyCustomizer} */ - public DependencyCustomizer ifAnyMissingClasses(final String... classNames) { + public DependencyCustomizer ifAnyMissingClasses(String... classNames) { return new DependencyCustomizer(this) { @Override protected boolean canAdd() { @@ -111,7 +111,7 @@ protected boolean canAdd() { * @param classNames the class names to test * @return a nested {@link DependencyCustomizer} */ - public DependencyCustomizer ifAllMissingClasses(final String... classNames) { + public DependencyCustomizer ifAllMissingClasses(String... classNames) { return new DependencyCustomizer(this) { @Override protected boolean canAdd() { @@ -135,7 +135,7 @@ protected boolean canAdd() { * @param paths the paths to test * @return a nested {@link DependencyCustomizer} */ - public DependencyCustomizer ifAllResourcesPresent(final String... paths) { + public DependencyCustomizer ifAllResourcesPresent(String... paths) { return new DependencyCustomizer(this) { @Override protected boolean canAdd() { @@ -161,7 +161,7 @@ protected boolean canAdd() { * @param paths the paths to test * @return a nested {@link DependencyCustomizer} */ - public DependencyCustomizer ifAnyResourcesPresent(final String... paths) { + public DependencyCustomizer ifAnyResourcesPresent(String... paths) { return new DependencyCustomizer(this) { @Override protected boolean canAdd() { diff --git a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/ExtendedGroovyClassLoader.java b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/ExtendedGroovyClassLoader.java index 35216e7ddd77..b7a00724f6da 100644 --- a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/ExtendedGroovyClassLoader.java +++ b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/ExtendedGroovyClassLoader.java @@ -179,7 +179,7 @@ private static class DefaultScopeParentClassLoader extends ClassLoader { parent.getParent()); } - private URL[] getGroovyJars(final ClassLoader parent) { + private URL[] getGroovyJars(ClassLoader parent) { Set urls = new HashSet<>(); findGroovyJarsDirectly(parent, urls); if (urls.isEmpty()) { diff --git a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/GroovyCompiler.java b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/GroovyCompiler.java index fdac83bb42e0..cd14ed22fb16 100644 --- a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/GroovyCompiler.java +++ b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/GroovyCompiler.java @@ -85,7 +85,7 @@ public class GroovyCompiler { * Create a new {@link GroovyCompiler} instance. * @param configuration the compiler configuration */ - public GroovyCompiler(final GroovyCompilerConfiguration configuration) { + public GroovyCompiler(GroovyCompilerConfiguration configuration) { this.configuration = configuration; this.loader = createLoader(configuration); diff --git a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/CliTester.java b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/CliTester.java index bde1ec0cd031..bf00c0f0c6bc 100644 --- a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/CliTester.java +++ b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/CliTester.java @@ -100,7 +100,7 @@ public String jar(String... args) throws Exception { return getOutput(); } - private Future submitCommand(final T command, + private Future submitCommand(T command, String... args) { clearUrlHandler(); final String[] sources = getSources(args); @@ -165,7 +165,7 @@ private String getOutput() { } @Override - public Statement apply(final Statement base, final Description description) { + public Statement apply(Statement base, Description description) { final Statement statement = CliTester.this.outputCapture .apply(new RunLauncherStatement(base), description); return new Statement() { diff --git a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java index e6261df15930..c9b7d3f3884f 100644 --- a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java +++ b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java @@ -240,7 +240,7 @@ public void restart() { * Restart the running application. * @param failureHandler a failure handler to deal with application that doesn't start */ - public void restart(final FailureHandler failureHandler) { + public void restart(FailureHandler failureHandler) { if (!this.enabled) { this.logger.debug("Application restart is disabled"); return; @@ -382,7 +382,7 @@ private void forceReferenceCleanup() { memory.add(new long[102400]); } } - catch (final OutOfMemoryError ex) { + catch (OutOfMemoryError ex) { // Expected } } @@ -439,7 +439,7 @@ private LeakSafeThread getLeakSafeThread() { } } - public Object getOrAddAttribute(final String name, + public Object getOrAddAttribute(String name, final ObjectFactory objectFactory) { synchronized (this.attributes) { if (!this.attributes.containsKey(name)) { @@ -630,7 +630,7 @@ public void run() { private class LeakSafeThreadFactory implements ThreadFactory { @Override - public Thread newThread(final Runnable runnable) { + public Thread newThread(Runnable runnable) { return getLeakSafeThread().callAndWait(() -> { Thread thread = new Thread(runnable); thread.setContextClassLoader(Restarter.this.applicationClassLoader); diff --git a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/classloader/RestartClassLoader.java b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/classloader/RestartClassLoader.java index 3f16c6e04270..26a96878c42a 100644 --- a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/classloader/RestartClassLoader.java +++ b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/classloader/RestartClassLoader.java @@ -118,7 +118,7 @@ public URL getResource(String name) { } @Override - public URL findResource(final String name) { + public URL findResource(String name) { final ClassLoaderFile file = this.updatedFiles.getFile(name); if (file == null) { return super.findResource(name); @@ -154,7 +154,7 @@ public Class loadClass(String name, boolean resolve) } @Override - protected Class findClass(final String name) throws ClassNotFoundException { + protected Class findClass(String name) throws ClassNotFoundException { String path = name.replace('.', '/').concat(".class"); final ClassLoaderFile file = this.updatedFiles.getFile(path); if (file == null) { diff --git a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/tunnel/client/HttpTunnelConnection.java b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/tunnel/client/HttpTunnelConnection.java index ad9bb502ec0a..6ce3d3a1435a 100644 --- a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/tunnel/client/HttpTunnelConnection.java +++ b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/tunnel/client/HttpTunnelConnection.java @@ -147,7 +147,7 @@ public int write(ByteBuffer src) throws IOException { return size; } - private void openNewConnection(final HttpTunnelPayload payload) { + private void openNewConnection(HttpTunnelPayload payload) { HttpTunnelConnection.this.executor.execute(new Runnable() { @Override diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/MockRestarter.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/MockRestarter.java index d42fd2042064..06e0229bccea 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/MockRestarter.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/MockRestarter.java @@ -43,7 +43,7 @@ public class MockRestarter implements TestRule { private Restarter mock = mock(Restarter.class); @Override - public Statement apply(final Statement base, Description description) { + public Statement apply(Statement base, Description description) { return new Statement() { @Override diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTypeExcludeFilter.java b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTypeExcludeFilter.java index c35405c8320f..8ca1b8ab2f84 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTypeExcludeFilter.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTypeExcludeFilter.java @@ -44,7 +44,7 @@ protected boolean hasAnnotation() { } @Override - protected Filter[] getFilters(final FilterType type) { + protected Filter[] getFilters(FilterType type) { switch (type) { case INCLUDE: return this.annotation.includeFilters(); diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jooq/JooqTypeExcludeFilter.java b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jooq/JooqTypeExcludeFilter.java index 654572da6e78..74f692621fc6 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jooq/JooqTypeExcludeFilter.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jooq/JooqTypeExcludeFilter.java @@ -44,7 +44,7 @@ protected boolean hasAnnotation() { } @Override - protected Filter[] getFilters(final FilterType type) { + protected Filter[] getFilters(FilterType type) { switch (type) { case INCLUDE: return this.annotation.includeFilters(); diff --git a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/ConfigFileApplicationContextInitializer.java b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/ConfigFileApplicationContextInitializer.java index ea5116a794b1..d27c1f874759 100644 --- a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/ConfigFileApplicationContextInitializer.java +++ b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/ConfigFileApplicationContextInitializer.java @@ -34,7 +34,7 @@ public class ConfigFileApplicationContextInitializer implements ApplicationContextInitializer { @Override - public void initialize(final ConfigurableApplicationContext applicationContext) { + public void initialize(ConfigurableApplicationContext applicationContext) { new ConfigFileApplicationListener() { public void apply() { addPropertySources(applicationContext.getEnvironment(), diff --git a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/json/AbstractJsonMarshalTester.java b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/json/AbstractJsonMarshalTester.java index 8f5d9e5285e0..136999ed751d 100644 --- a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/json/AbstractJsonMarshalTester.java +++ b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/json/AbstractJsonMarshalTester.java @@ -365,13 +365,13 @@ protected FieldInitializer( this.testerClass = testerClass; } - public void initFields(final Object testInstance, final M marshaller) { + public void initFields(Object testInstance, M marshaller) { Assert.notNull(testInstance, "TestInstance must not be null"); Assert.notNull(marshaller, "Marshaller must not be null"); initFields(testInstance, () -> marshaller); } - public void initFields(final Object testInstance, + public void initFields(Object testInstance, final ObjectFactory marshaller) { Assert.notNull(testInstance, "TestInstance must not be null"); Assert.notNull(marshaller, "Marshaller must not be null"); diff --git a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/rule/OutputCapture.java b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/rule/OutputCapture.java index df68ab0b2fd8..ee8f41c528a4 100644 --- a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/rule/OutputCapture.java +++ b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/rule/OutputCapture.java @@ -52,7 +52,7 @@ public class OutputCapture implements TestRule { private List> matchers = new ArrayList<>(); @Override - public Statement apply(final Statement base, Description description) { + public Statement apply(Statement base, Description description) { return new Statement() { @Override public void evaluate() throws Throwable { diff --git a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/json/JsonContentAssertTests.java b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/json/JsonContentAssertTests.java index 97e67680edf4..543041befb93 100644 --- a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/json/JsonContentAssertTests.java +++ b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/json/JsonContentAssertTests.java @@ -1306,7 +1306,7 @@ private static String loadJson(String path) { } - private AssertProvider forJson(final String json) { + private AssertProvider forJson(String json) { return () -> new JsonContentAssert(JsonContentAssertTests.class, json); } diff --git a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/json/ObjectContentAssertTests.java b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/json/ObjectContentAssertTests.java index bec199d4f9d1..b4f7f935abf4 100644 --- a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/json/ObjectContentAssertTests.java +++ b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/json/ObjectContentAssertTests.java @@ -72,7 +72,7 @@ public void asMapForNonMapShouldFail() throws Exception { assertThat(forObject(SOURCE)).asMap(); } - private AssertProvider> forObject(final Object source) { + private AssertProvider> forObject(Object source) { return () -> new ObjectContentAssert<>(source); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/JarWriter.java b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/JarWriter.java index 32d8c8d522b1..c0b2b8760e58 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/JarWriter.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/JarWriter.java @@ -108,7 +108,7 @@ private void setExecutableFilePermission(File file) { * @param manifest the manifest to write * @throws IOException of the manifest cannot be written */ - public void writeManifest(final Manifest manifest) throws IOException { + public void writeManifest(Manifest manifest) throws IOException { JarArchiveEntry entry = new JarArchiveEntry("META-INF/MANIFEST.MF"); writeEntry(entry, manifest::write); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/SignalUtils.java b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/SignalUtils.java index 953524a1be73..2e5f56700c26 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/SignalUtils.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/SignalUtils.java @@ -37,7 +37,7 @@ private SignalUtils() { * Handle {@literal INT} signals by calling the specified {@link Runnable}. * @param runnable the runnable to call on SIGINT. */ - public static void attachSignalHandler(final Runnable runnable) { + public static void attachSignalHandler(Runnable runnable) { Signal.handle(SIG_INT, (signal) -> runnable.run()); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/LaunchedURLClassLoader.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/LaunchedURLClassLoader.java index b941c736a5fd..25a9e6f4ba02 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/LaunchedURLClassLoader.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/LaunchedURLClassLoader.java @@ -126,7 +126,7 @@ private void definePackageIfNecessary(String className) { } } - private void definePackage(final String className, final String packageName) { + private void definePackage(String className, String packageName) { try { AccessController.doPrivileged((PrivilegedExceptionAction) () -> { String packageEntryName = packageName.replace('.', '/') + "/"; diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/JarFile.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/JarFile.java index 8676f28424ea..7fca918fc70d 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/JarFile.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/JarFile.java @@ -228,7 +228,7 @@ InputStream getInputStream(String name, ResourceAccess access) throws IOExceptio * @return a {@link JarFile} for the entry * @throws IOException if the nested jar file cannot be read */ - public synchronized JarFile getNestedJarFile(final ZipEntry entry) + public synchronized JarFile getNestedJarFile(ZipEntry entry) throws IOException { return getNestedJarFile((JarEntry) entry); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/PropertiesLauncherTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/PropertiesLauncherTests.java index b1a3059a5361..eb980be62d7c 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/PropertiesLauncherTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/PropertiesLauncherTests.java @@ -348,7 +348,7 @@ private void waitFor(String value) throws Exception { assertThat(timeout).as("Timed out waiting for (" + value + ")").isTrue(); } - private Condition endingWith(final String value) { + private Condition endingWith(String value) { return new Condition() { @Override diff --git a/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/assertj/Matched.java b/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/assertj/Matched.java index 2aa0356c68b8..518494b59921 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/assertj/Matched.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/assertj/Matched.java @@ -39,7 +39,7 @@ private Matched(Matcher matcher) { } @Override - public boolean matches(final T value) { + public boolean matches(T value) { if (this.matcher.matches(value)) { return true; } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/rule/OutputCapture.java b/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/rule/OutputCapture.java index 52f415659d1e..6b36872d4975 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/rule/OutputCapture.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/rule/OutputCapture.java @@ -48,7 +48,7 @@ public class OutputCapture implements TestRule { private List> matchers = new ArrayList<>(); @Override - public Statement apply(final Statement base, Description description) { + public Statement apply(Statement base, Description description) { return new Statement() { @Override public void evaluate() throws Throwable { diff --git a/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/rule/RedisTestServer.java b/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/rule/RedisTestServer.java index ed1d81b32a49..9b7215c79c98 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/rule/RedisTestServer.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/rule/RedisTestServer.java @@ -48,7 +48,7 @@ public class RedisTestServer implements TestRule { private RedisConnectionFactory connectionFactory; @Override - public Statement apply(final Statement base, Description description) { + public Statement apply(Statement base, Description description) { try { this.connectionFactory = createConnectionFactory(); return new RedisStatement(base, this.connectionFactory); diff --git a/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/runner/classpath/ModifiedClassPathRunner.java b/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/runner/classpath/ModifiedClassPathRunner.java index 112869e95540..2af2909ad598 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/runner/classpath/ModifiedClassPathRunner.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/runner/classpath/ModifiedClassPathRunner.java @@ -317,7 +317,7 @@ private ModifiedClassPathFrameworkMethod(Method method) { } @Override - public Object invokeExplosively(final Object target, final Object... params) + public Object invokeExplosively(Object target, Object... params) throws Throwable { return doWithModifiedClassPathThreadContextClassLoader( () -> ModifiedClassPathFrameworkMethod.super.invokeExplosively( diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/StartupInfoLogger.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/StartupInfoLogger.java index 91ff4b64ee58..2389572eaa39 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/StartupInfoLogger.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/StartupInfoLogger.java @@ -99,7 +99,7 @@ private String getApplicationName() { : "application"); } - private String getVersion(final Class source) { + private String getVersion(Class source) { return getValue(" v", () -> source.getPackage().getImplementationVersion(), ""); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ExitCodeGeneratorsTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ExitCodeGeneratorsTests.java index c24732b6f093..3d3ee68109d1 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ExitCodeGeneratorsTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ExitCodeGeneratorsTests.java @@ -101,8 +101,8 @@ private ExitCodeGenerator mockGenerator(int exitCode) { return generator; } - private ExitCodeExceptionMapper mockMapper(final Class exceptionType, - final int exitCode) { + private ExitCodeExceptionMapper mockMapper(Class exceptionType, + int exitCode) { return (exception) -> { if (exceptionType.isInstance(exception)) { return exitCode; diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigFileApplicationListenerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigFileApplicationListenerTests.java index 75dc8aca811c..780fd93b8a52 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigFileApplicationListenerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigFileApplicationListenerTests.java @@ -100,7 +100,7 @@ public void cleanUp() { public void loadCustomResource() throws Exception { this.application.setResourceLoader(new ResourceLoader() { @Override - public Resource getResource(final String location) { + public Resource getResource(String location) { if (location.equals("classpath:/custom.properties")) { return new ByteArrayResource("the.property: fromcustom".getBytes(), location) { @@ -885,7 +885,7 @@ public boolean matches(ConfigurableEnvironment value) { }; } - private Condition matchingProfile(final String profile) { + private Condition matchingProfile(String profile) { return new Condition("accepts profile " + profile) { @Override diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/undertow/UndertowServletWebServerFactoryTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/undertow/UndertowServletWebServerFactoryTests.java index e7ed1f33199d..d1c1c59322d0 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/undertow/UndertowServletWebServerFactoryTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/undertow/UndertowServletWebServerFactoryTests.java @@ -202,7 +202,7 @@ private void testAccessLog(String prefix, String suffix, String expectedFile) } @Override - protected void addConnector(final int port, AbstractServletWebServerFactory factory) { + protected void addConnector(int port, AbstractServletWebServerFactory factory) { ((UndertowServletWebServerFactory) factory).addBuilderCustomizers( (builder) -> builder.addHttpListener(port, "0.0.0.0")); } diff --git a/spring-boot-samples/spring-boot-sample-atmosphere/src/main/java/sample/atmosphere/ChatService.java b/spring-boot-samples/spring-boot-sample-atmosphere/src/main/java/sample/atmosphere/ChatService.java index 7163bfa56e27..769951ae7225 100644 --- a/spring-boot-samples/spring-boot-sample-atmosphere/src/main/java/sample/atmosphere/ChatService.java +++ b/spring-boot-samples/spring-boot-sample-atmosphere/src/main/java/sample/atmosphere/ChatService.java @@ -35,7 +35,7 @@ public class ChatService { private final Logger logger = LoggerFactory.getLogger(ChatService.class); @Ready - public void onReady(final AtmosphereResource resource) { + public void onReady(AtmosphereResource resource) { this.logger.info("Connected", resource.uuid()); } diff --git a/spring-boot-samples/spring-boot-sample-data-cassandra/src/test/java/sample/data/cassandra/SampleCassandraApplicationTests.java b/spring-boot-samples/spring-boot-sample-data-cassandra/src/test/java/sample/data/cassandra/SampleCassandraApplicationTests.java index b968ffa89e14..54770002baa8 100644 --- a/spring-boot-samples/spring-boot-sample-data-cassandra/src/test/java/sample/data/cassandra/SampleCassandraApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-data-cassandra/src/test/java/sample/data/cassandra/SampleCassandraApplicationTests.java @@ -61,7 +61,7 @@ public void testDefaultSettings() throws Exception { static class SkipOnWindows implements TestRule { @Override - public Statement apply(final Statement base, Description description) { + public Statement apply(Statement base, Description description) { return new Statement() { @Override diff --git a/spring-boot-samples/spring-boot-sample-data-elasticsearch/src/test/java/sample/data/elasticsearch/SampleElasticsearchApplicationTests.java b/spring-boot-samples/spring-boot-sample-data-elasticsearch/src/test/java/sample/data/elasticsearch/SampleElasticsearchApplicationTests.java index 8487c8ba0d6f..6f362e0b54b9 100644 --- a/spring-boot-samples/spring-boot-sample-data-elasticsearch/src/test/java/sample/data/elasticsearch/SampleElasticsearchApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-data-elasticsearch/src/test/java/sample/data/elasticsearch/SampleElasticsearchApplicationTests.java @@ -73,7 +73,7 @@ private boolean elasticsearchRunning(Exception ex) { static class SkipOnWindows implements TestRule { @Override - public Statement apply(final Statement base, Description description) { + public Statement apply(Statement base, Description description) { return new Statement() { @Override diff --git a/spring-boot-samples/spring-boot-sample-flyway/src/main/java/sample/flyway/SampleFlywayApplication.java b/spring-boot-samples/spring-boot-sample-flyway/src/main/java/sample/flyway/SampleFlywayApplication.java index 88fb1c311001..551004b26c6b 100644 --- a/spring-boot-samples/spring-boot-sample-flyway/src/main/java/sample/flyway/SampleFlywayApplication.java +++ b/spring-boot-samples/spring-boot-sample-flyway/src/main/java/sample/flyway/SampleFlywayApplication.java @@ -29,7 +29,7 @@ public static void main(String[] args) throws Exception { } @Bean - public CommandLineRunner runner(final PersonRepository repository) { + public CommandLineRunner runner(PersonRepository repository) { return new CommandLineRunner() { @Override diff --git a/spring-boot-samples/spring-boot-sample-jta-atomikos/src/test/java/sample/atomikos/SampleAtomikosApplicationTests.java b/spring-boot-samples/spring-boot-sample-jta-atomikos/src/test/java/sample/atomikos/SampleAtomikosApplicationTests.java index 09aa8a7b6ca5..f72819c8493e 100644 --- a/spring-boot-samples/spring-boot-sample-jta-atomikos/src/test/java/sample/atomikos/SampleAtomikosApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-jta-atomikos/src/test/java/sample/atomikos/SampleAtomikosApplicationTests.java @@ -44,7 +44,7 @@ public void testTransactionRollback() throws Exception { assertThat(output).has(substring(1, "Simulated error")); } - private Condition substring(final int times, final String substring) { + private Condition substring(int times, String substring) { return new Condition( "containing '" + substring + "' " + times + " times") { diff --git a/spring-boot-samples/spring-boot-sample-jta-bitronix/src/test/java/sample/bitronix/SampleBitronixApplicationTests.java b/spring-boot-samples/spring-boot-sample-jta-bitronix/src/test/java/sample/bitronix/SampleBitronixApplicationTests.java index 9bcc144158e5..f98719f0d375 100644 --- a/spring-boot-samples/spring-boot-sample-jta-bitronix/src/test/java/sample/bitronix/SampleBitronixApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-jta-bitronix/src/test/java/sample/bitronix/SampleBitronixApplicationTests.java @@ -60,7 +60,7 @@ public void testExposesXaAndNonXa() throws Exception { .isNotInstanceOf(PoolingConnectionFactory.class); } - private Condition substring(final int times, final String substring) { + private Condition substring(int times, String substring) { return new Condition( "containing '" + substring + "' " + times + " times") { diff --git a/spring-boot-samples/spring-boot-sample-jta-narayana/src/test/java/sample/narayana/SampleNarayanaApplicationTests.java b/spring-boot-samples/spring-boot-sample-jta-narayana/src/test/java/sample/narayana/SampleNarayanaApplicationTests.java index df9c59fb3bbe..a8e2d56602cf 100644 --- a/spring-boot-samples/spring-boot-sample-jta-narayana/src/test/java/sample/narayana/SampleNarayanaApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-jta-narayana/src/test/java/sample/narayana/SampleNarayanaApplicationTests.java @@ -44,7 +44,7 @@ public void testTransactionRollback() throws Exception { assertThat(output).has(substring(1, "Simulated error")); } - private Condition substring(final int times, final String substring) { + private Condition substring(int times, String substring) { return new Condition( "containing '" + substring + "' " + times + " times") { diff --git a/spring-boot-samples/spring-boot-sample-parent-context/src/test/java/sample/parent/consumer/SampleIntegrationParentApplicationTests.java b/spring-boot-samples/spring-boot-sample-parent-context/src/test/java/sample/parent/consumer/SampleIntegrationParentApplicationTests.java index 0600c31ac271..9ab748690b42 100644 --- a/spring-boot-samples/spring-boot-sample-parent-context/src/test/java/sample/parent/consumer/SampleIntegrationParentApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-parent-context/src/test/java/sample/parent/consumer/SampleIntegrationParentApplicationTests.java @@ -61,7 +61,7 @@ public void testVanillaExchange() throws Exception { awaitOutputContaining("Hello World"); } - private void awaitOutputContaining(final String requiredContents) throws Exception { + private void awaitOutputContaining(String requiredContents) throws Exception { long endTime = System.currentTimeMillis() + 30000; String output = null; while (System.currentTimeMillis() < endTime) {