Polishing
- primarily automated "clean up" using Eclipse IDE
This commit is contained in:
parent
52af5c2b38
commit
69f47e7700
|
@ -155,7 +155,7 @@ public final class BeanInstanceSupplier<T> extends AutowiredElementResolver impl
|
|||
public BeanInstanceSupplier<T> withGenerator(
|
||||
ThrowingBiFunction<RegisteredBean, AutowiredArguments, T> generator) {
|
||||
Assert.notNull(generator, "'generator' must not be null");
|
||||
return new BeanInstanceSupplier<T>(this.lookup, generator, this.shortcuts);
|
||||
return new BeanInstanceSupplier<>(this.lookup, generator, this.shortcuts);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -196,7 +196,7 @@ public final class BeanInstanceSupplier<T> extends AutowiredElementResolver impl
|
|||
* that uses the shortcuts
|
||||
*/
|
||||
public BeanInstanceSupplier<T> withShortcuts(String... beanNames) {
|
||||
return new BeanInstanceSupplier<T>(this.lookup, this.generator, beanNames);
|
||||
return new BeanInstanceSupplier<>(this.lookup, this.generator, beanNames);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -75,7 +75,7 @@ public interface InstanceSupplier<T> extends ThrowingSupplier<T> {
|
|||
default <V> InstanceSupplier<V> andThen(
|
||||
ThrowingBiFunction<RegisteredBean, ? super T, ? extends V> after) {
|
||||
Assert.notNull(after, "'after' function must not be null");
|
||||
return new InstanceSupplier<V>() {
|
||||
return new InstanceSupplier<>() {
|
||||
|
||||
@Override
|
||||
public V get(RegisteredBean registeredBean) throws Exception {
|
||||
|
@ -119,7 +119,7 @@ public interface InstanceSupplier<T> extends ThrowingSupplier<T> {
|
|||
&& instanceSupplier.getFactoryMethod() == factoryMethod) {
|
||||
return instanceSupplier;
|
||||
}
|
||||
return new InstanceSupplier<T>() {
|
||||
return new InstanceSupplier<>() {
|
||||
|
||||
@Override
|
||||
public T get(RegisteredBean registeredBean) throws Exception {
|
||||
|
|
|
@ -380,6 +380,7 @@ class BeanWrapperTests extends AbstractPropertyAccessorTests {
|
|||
}
|
||||
|
||||
|
||||
@SuppressWarnings("try")
|
||||
public static class ActiveResource implements AutoCloseable {
|
||||
|
||||
public ActiveResource getResource() {
|
||||
|
|
|
@ -56,8 +56,7 @@ public final class CompilerFiles implements UnaryOperator<TestCompiler> {
|
|||
return testCompiler
|
||||
.withSources(adapt(Kind.SOURCE, (path, inputStreamSource) ->
|
||||
SourceFile.of(inputStreamSource)))
|
||||
.withResources(adapt(Kind.RESOURCE, (path, inputStreamSource) ->
|
||||
ResourceFile.of(path, inputStreamSource)))
|
||||
.withResources(adapt(Kind.RESOURCE, ResourceFile::of))
|
||||
.withClasses(adapt(Kind.CLASS, (path, inputStreamSource) ->
|
||||
ClassFile.of(ClassFile.toClassName(path), inputStreamSource)));
|
||||
}
|
||||
|
|
|
@ -117,8 +117,7 @@ public abstract class AbstractFileResolvingResource extends AbstractResource {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
else if (con instanceof JarURLConnection) {
|
||||
JarURLConnection jarCon = (JarURLConnection) con;
|
||||
else if (con instanceof JarURLConnection jarCon) {
|
||||
JarEntry jarEntry = jarCon.getJarEntry();
|
||||
if (jarEntry == null) {
|
||||
return false;
|
||||
|
|
|
@ -417,7 +417,7 @@ public interface DataBuffer {
|
|||
*/
|
||||
default InputStream asInputStream(boolean releaseOnClose) {
|
||||
return new DataBufferInputStream(this, releaseOnClose);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Expose this buffer's data as an {@link OutputStream}. Both data and write position are
|
||||
|
|
|
@ -370,8 +370,7 @@ final class HtmlUnitRequestBuilder implements RequestBuilder, Mergeable {
|
|||
}
|
||||
|
||||
private void addRequestParameter(MockHttpServletRequest request, NameValuePair param) {
|
||||
if (param instanceof KeyDataPair) {
|
||||
KeyDataPair pair = (KeyDataPair) param;
|
||||
if (param instanceof KeyDataPair pair) {
|
||||
File file = pair.getFile();
|
||||
MockPart part;
|
||||
if (file != null) {
|
||||
|
|
|
@ -24,11 +24,10 @@ import io.micrometer.common.KeyValues;
|
|||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.HttpStatusCode;
|
||||
import org.springframework.http.client.ClientHttpResponse;
|
||||
import org.springframework.http.client.observation.ClientHttpObservationDocumentation.HighCardinalityKeyNames;
|
||||
import org.springframework.http.client.observation.ClientHttpObservationDocumentation.LowCardinalityKeyNames;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import static org.springframework.http.client.observation.ClientHttpObservationDocumentation.HighCardinalityKeyNames;
|
||||
import static org.springframework.http.client.observation.ClientHttpObservationDocumentation.LowCardinalityKeyNames;
|
||||
|
||||
/**
|
||||
* Default implementation for a {@link ClientRequestObservationConvention},
|
||||
* extracting information from the {@link ClientRequestObservationContext}.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -85,6 +85,7 @@ public class ExtractingResponseErrorHandler extends DefaultResponseErrorHandler
|
|||
/**
|
||||
* Set the message converters to use by this extractor.
|
||||
*/
|
||||
@Override
|
||||
public void setMessageConverters(List<HttpMessageConverter<?>> messageConverters) {
|
||||
this.messageConverters = messageConverters;
|
||||
}
|
||||
|
|
|
@ -24,9 +24,8 @@ import io.micrometer.common.KeyValues;
|
|||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.HttpStatusCode;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import static org.springframework.web.reactive.function.client.ClientHttpObservationDocumentation.HighCardinalityKeyNames;
|
||||
import static org.springframework.web.reactive.function.client.ClientHttpObservationDocumentation.LowCardinalityKeyNames;
|
||||
import org.springframework.web.reactive.function.client.ClientHttpObservationDocumentation.HighCardinalityKeyNames;
|
||||
import org.springframework.web.reactive.function.client.ClientHttpObservationDocumentation.LowCardinalityKeyNames;
|
||||
|
||||
/**
|
||||
* Default implementation for a {@link ClientRequestObservationConvention},
|
||||
|
|
|
@ -125,7 +125,7 @@ class DefaultWebClient implements WebClient {
|
|||
handlerMap.entrySet().stream()
|
||||
.map(entry -> new DefaultResponseSpec.StatusHandler(entry.getKey(), entry.getValue()))
|
||||
.toList());
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
|
|
|
@ -232,8 +232,8 @@ public abstract class MvcNamespaceUtils {
|
|||
}
|
||||
|
||||
/**
|
||||
* Registers an {@link FixedThemeResolver} under a well-known name
|
||||
* unless already registered.
|
||||
* Registers an {@link org.springframework.web.servlet.theme.FixedThemeResolver}
|
||||
* under a well-known name unless already registered.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
private static void registerThemeResolver(ParserContext context, @Nullable Object source) {
|
||||
|
|
Loading…
Reference in New Issue