diff --git a/core/spring-boot/src/main/java/org/springframework/boot/context/properties/PropertyMapper.java b/core/spring-boot/src/main/java/org/springframework/boot/context/properties/PropertyMapper.java index 222eae45cc7..bf1430e8b63 100644 --- a/core/spring-boot/src/main/java/org/springframework/boot/context/properties/PropertyMapper.java +++ b/core/spring-boot/src/main/java/org/springframework/boot/context/properties/PropertyMapper.java @@ -430,7 +430,7 @@ public final class PropertyMapper { * @param consumer the consumer that should accept the value if it's not been * filtered */ - public void to(Consumer<@Nullable ? super T> consumer) { + public void to(Consumer consumer) { Assert.notNull(consumer, "'consumer' must not be null"); T value = getValue(); if (value == null || test(value)) { diff --git a/module/spring-boot-jpa/src/main/java/org/springframework/boot/jpa/EntityManagerFactoryBuilder.java b/module/spring-boot-jpa/src/main/java/org/springframework/boot/jpa/EntityManagerFactoryBuilder.java index 4d241563f62..7501d765773 100644 --- a/module/spring-boot-jpa/src/main/java/org/springframework/boot/jpa/EntityManagerFactoryBuilder.java +++ b/module/spring-boot-jpa/src/main/java/org/springframework/boot/jpa/EntityManagerFactoryBuilder.java @@ -74,7 +74,7 @@ public class EntityManagerFactoryBuilder { private @Nullable List persistenceUnitPostProcessors; - private @Nullable Supplier<@Nullable ? extends RuntimeException> requireBootstrapExecutorExceptionSupplier; + private @Nullable Supplier requireBootstrapExecutorExceptionSupplier; /** * Create a new instance passing in the common pieces that will be shared if multiple @@ -186,7 +186,7 @@ public class EntityManagerFactoryBuilder { * @param exceptionSupplier a supplier providing the exception to throw * @since 4.1.0 */ - public void requireBootstrapExecutor(Supplier<@Nullable ? extends RuntimeException> exceptionSupplier) { + public void requireBootstrapExecutor(Supplier exceptionSupplier) { Assert.notNull(exceptionSupplier, "'exceptionSupplier' must not be null"); this.requireBootstrapExecutorExceptionSupplier = exceptionSupplier; } @@ -368,7 +368,7 @@ public class EntityManagerFactoryBuilder { return EntityManagerFactoryBuilder.this.bootstrapExecutor; } if (EntityManagerFactoryBuilder.this.requireBootstrapExecutorExceptionSupplier != null) { - @Nullable AsyncTaskExecutor fallback = EntityManagerFactoryBuilder.this.fallbackBootstrapExecutor.get(); + AsyncTaskExecutor fallback = EntityManagerFactoryBuilder.this.fallbackBootstrapExecutor.get(); if (fallback != null) { return fallback; } diff --git a/module/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/actuate/endpoint/web/AbstractWebFluxEndpointHandlerMapping.java b/module/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/actuate/endpoint/web/AbstractWebFluxEndpointHandlerMapping.java index 72bd7471a0b..5460b40eb4e 100644 --- a/module/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/actuate/endpoint/web/AbstractWebFluxEndpointHandlerMapping.java +++ b/module/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/actuate/endpoint/web/AbstractWebFluxEndpointHandlerMapping.java @@ -416,7 +416,7 @@ public abstract class AbstractWebFluxEndpointHandlerMapping extends RequestMappi } private @Nullable Publisher invoke(InvocationContext invocationContext) { - return (@Nullable Publisher) this.invoker.invoke(invocationContext); + return (Publisher) this.invoker.invoke(invocationContext); } private Map getArguments(ServerWebExchange exchange, @Nullable Map body) {