Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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<Object>(
"CloudFoundryAuthorizationException with " + reason + " reason") {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public boolean isUseCodeAsDefaultMessage() {
return this.useCodeAsDefaultMessage;
}

public void setUseCodeAsDefaultMessage(final boolean useCodeAsDefaultMessage) {
public void setUseCodeAsDefaultMessage(boolean useCodeAsDefaultMessage) {
this.useCodeAsDefaultMessage = useCodeAsDefaultMessage;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public String getApiKey() {
return this.apiKey;
}

public void setApiKey(final String apiKey) {
public void setApiKey(String apiKey) {
this.apiKey = apiKey;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Void>) (session) -> {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ private List<MessageConverter> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public String getHelp() {
@Override
public Collection<OptionHelp> getOptionsHelp() {
List<OptionHelp> help = new ArrayList<>();
for (final Command command : this.commandRunner) {
for (Command command : this.commandRunner) {
if (isHelpShown(command)) {
help.add(new OptionHelp() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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() {
Expand All @@ -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() {
Expand All @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ private static class DefaultScopeParentClassLoader extends ClassLoader {
parent.getParent());
}

private URL[] getGroovyJars(final ClassLoader parent) {
private URL[] getGroovyJars(ClassLoader parent) {
Set<URL> urls = new HashSet<>();
findGroovyJarsDirectly(parent, urls);
if (urls.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public String jar(String... args) throws Exception {
return getOutput();
}

private <T extends OptionParsingCommand> Future<T> submitCommand(final T command,
private <T extends OptionParsingCommand> Future<T> submitCommand(T command,
String... args) {
clearUrlHandler();
final String[] sources = getSources(args);
Expand Down Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -382,7 +382,7 @@ private void forceReferenceCleanup() {
memory.add(new long[102400]);
}
}
catch (final OutOfMemoryError ex) {
catch (OutOfMemoryError ex) {
// Expected
}
}
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class ConfigFileApplicationContextInitializer
implements ApplicationContextInitializer<ConfigurableApplicationContext> {

@Override
public void initialize(final ConfigurableApplicationContext applicationContext) {
public void initialize(ConfigurableApplicationContext applicationContext) {
new ConfigFileApplicationListener() {
public void apply() {
addPropertySources(applicationContext.getEnvironment(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<M> marshaller) {
Assert.notNull(testInstance, "TestInstance must not be null");
Assert.notNull(marshaller, "Marshaller must not be null");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class OutputCapture implements TestRule {
private List<Matcher<? super String>> 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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,7 @@ private static String loadJson(String path) {

}

private AssertProvider<JsonContentAssert> forJson(final String json) {
private AssertProvider<JsonContentAssert> forJson(String json) {
return () -> new JsonContentAssert(JsonContentAssertTests.class, json);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void asMapForNonMapShouldFail() throws Exception {
assertThat(forObject(SOURCE)).asMap();
}

private AssertProvider<ObjectContentAssert<Object>> forObject(final Object source) {
private AssertProvider<ObjectContentAssert<Object>> forObject(Object source) {
return () -> new ObjectContentAssert<>(source);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Object>) () -> {
String packageEntryName = packageName.replace('.', '/') + "/";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ private void waitFor(String value) throws Exception {
assertThat(timeout).as("Timed out waiting for (" + value + ")").isTrue();
}

private Condition<Archive> endingWith(final String value) {
private Condition<Archive> endingWith(String value) {
return new Condition<Archive>() {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ private Matched(Matcher<? extends T> matcher) {
}

@Override
public boolean matches(final T value) {
public boolean matches(T value) {
if (this.matcher.matches(value)) {
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class OutputCapture implements TestRule {
private List<Matcher<? super String>> 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 {
Expand Down
Loading