Polishing

- primarily automated "clean up" using Eclipse IDE
This commit is contained in:
Sam Brannen
2022-12-09 00:53:54 -05:00
parent 52af5c2b38
commit 69f47e7700
12 changed files with 18 additions and 21 deletions

View File

@@ -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

View File

@@ -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 {

View File

@@ -380,6 +380,7 @@ class BeanWrapperTests extends AbstractPropertyAccessorTests {
}
@SuppressWarnings("try")
public static class ActiveResource implements AutoCloseable {
public ActiveResource getResource() {