Remove unneeded `@SuppressWarnings("NullAway")`

Closes gh-32542
This commit is contained in:
Sébastien Deleuze 2024-05-06 17:58:14 +02:00
parent 93dcbc41b0
commit 12272d6e41
10 changed files with 1 additions and 11 deletions

View File

@ -13,7 +13,7 @@ dependencies {
jmh 'org.openjdk.jmh:jmh-generator-annprocess:1.37' jmh 'org.openjdk.jmh:jmh-generator-annprocess:1.37'
jmh 'org.openjdk.jmh:jmh-generator-bytecode:1.37' jmh 'org.openjdk.jmh:jmh-generator-bytecode:1.37'
jmh 'net.sf.jopt-simple:jopt-simple' jmh 'net.sf.jopt-simple:jopt-simple'
errorprone 'com.uber.nullaway:nullaway:0.10.24' errorprone 'com.uber.nullaway:nullaway:0.10.26'
errorprone 'com.google.errorprone:error_prone_core:2.9.0' errorprone 'com.google.errorprone:error_prone_core:2.9.0'
} }

View File

@ -134,7 +134,6 @@ public abstract class AbstractRoutingDataSource extends AbstractDataSource imple
* @see #getResolvedDataSources() * @see #getResolvedDataSources()
* @see #getResolvedDefaultDataSource() * @see #getResolvedDefaultDataSource()
*/ */
@SuppressWarnings("NullAway")
public void initialize() { public void initialize() {
if (this.targetDataSources == null) { if (this.targetDataSources == null) {
throw new IllegalArgumentException("Property 'targetDataSources' is required"); throw new IllegalArgumentException("Property 'targetDataSources' is required");

View File

@ -305,7 +305,6 @@ public class MessageMappingMessageHandler extends AbstractMethodMessageHandler<C
* @param destinations the destinations * @param destinations the destinations
* @return new array with the processed destinations or the same array * @return new array with the processed destinations or the same array
*/ */
@SuppressWarnings("NullAway")
protected String[] processDestinations(String[] destinations) { protected String[] processDestinations(String[] destinations) {
if (this.valueResolver != null) { if (this.valueResolver != null) {
destinations = Arrays.stream(destinations) destinations = Arrays.stream(destinations)

View File

@ -645,7 +645,6 @@ public class MessageHeaderAccessor {
return super.getRawHeaders(); return super.getRawHeaders();
} }
@SuppressWarnings("NullAway")
public void setImmutable() { public void setImmutable() {
if (!this.mutable) { if (!this.mutable) {
return; return;

View File

@ -383,7 +383,6 @@ final class DefaultDatabaseClient implements DatabaseClient {
return fetch().rowsUpdated().then(); return fetch().rowsUpdated().then();
} }
@SuppressWarnings("NullAway")
private ResultFunction getResultFunction(Supplier<String> sqlSupplier) { private ResultFunction getResultFunction(Supplier<String> sqlSupplier) {
BiFunction<Connection, String, Statement> statementFunction = (connection, sql) -> { BiFunction<Connection, String, Statement> statementFunction = (connection, sql) -> {
if (logger.isDebugEnabled()) { if (logger.isDebugEnabled()) {

View File

@ -374,7 +374,6 @@ class DefaultWebTestClient implements WebTestClient {
DefaultWebTestClient.this.entityResultConsumer, getResponseTimeout()); DefaultWebTestClient.this.entityResultConsumer, getResponseTimeout());
} }
@SuppressWarnings("NullAway")
private ClientRequest.Builder initRequestBuilder() { private ClientRequest.Builder initRequestBuilder() {
return ClientRequest.create(this.httpMethod, initUri()) return ClientRequest.create(this.httpMethod, initUri())
.headers(headersToUse -> { .headers(headersToUse -> {

View File

@ -47,7 +47,6 @@ public class ViewResultMatchers {
/** /**
* Assert the selected view name with the given Hamcrest {@link Matcher}. * Assert the selected view name with the given Hamcrest {@link Matcher}.
*/ */
@SuppressWarnings("NullAway")
public ResultMatcher name(Matcher<? super String> matcher) { public ResultMatcher name(Matcher<? super String> matcher) {
return result -> { return result -> {
ModelAndView mav = result.getModelAndView(); ModelAndView mav = result.getModelAndView();
@ -61,7 +60,6 @@ public class ViewResultMatchers {
/** /**
* Assert the selected view name. * Assert the selected view name.
*/ */
@SuppressWarnings("NullAway")
public ResultMatcher name(String expectedViewName) { public ResultMatcher name(String expectedViewName) {
return result -> { return result -> {
ModelAndView mav = result.getModelAndView(); ModelAndView mav = result.getModelAndView();

View File

@ -116,7 +116,6 @@ final class MultipartParser extends BaseSubscriber<DataBuffer> {
} }
@Override @Override
@SuppressWarnings("NullAway")
protected void hookOnNext(DataBuffer value) { protected void hookOnNext(DataBuffer value) {
this.requestOutstanding.set(false); this.requestOutstanding.set(false);
this.state.get().onNext(value); this.state.get().onNext(value);

View File

@ -543,7 +543,6 @@ final class DefaultRestClient implements RestClient {
} }
} }
@SuppressWarnings("NullAway")
private ClientHttpRequest createRequest(URI uri) throws IOException { private ClientHttpRequest createRequest(URI uri) throws IOException {
ClientHttpRequestFactory factory; ClientHttpRequestFactory factory;
if (DefaultRestClient.this.interceptors != null) { if (DefaultRestClient.this.interceptors != null) {

View File

@ -215,7 +215,6 @@ public class ServletInvocableHandlerMethod extends InvocableHandlerMethod {
private final MethodParameter returnType; private final MethodParameter returnType;
@SuppressWarnings("NullAway")
public ConcurrentResultHandlerMethod(@Nullable Object result, ConcurrentResultMethodParameter returnType) { public ConcurrentResultHandlerMethod(@Nullable Object result, ConcurrentResultMethodParameter returnType) {
super((Callable<Object>) () -> { super((Callable<Object>) () -> {
if (result instanceof Exception exception) { if (result instanceof Exception exception) {