Upgrade NullAway to 0.12.4
This commit also slightly refines nullness but without significant user-side impact expected. Closes gh-34525
This commit is contained in:
@@ -20,6 +20,7 @@ import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.JvmClassMappingKt;
|
||||
@@ -317,7 +318,7 @@ public class InvocableHandlerMethod extends HandlerMethod {
|
||||
KType type = parameter.getType();
|
||||
if (!(type.isMarkedNullable() && arg == null) && type.getClassifier() instanceof KClass<?> kClass
|
||||
&& KotlinDetector.isInlineClass(JvmClassMappingKt.getJavaClass(kClass))) {
|
||||
KFunction<?> constructor = KClasses.getPrimaryConstructor(kClass);
|
||||
KFunction<?> constructor = Objects.requireNonNull(KClasses.getPrimaryConstructor(kClass));
|
||||
if (!KCallablesJvm.isAccessible(constructor)) {
|
||||
KCallablesJvm.setAccessible(constructor, true);
|
||||
}
|
||||
|
||||
@@ -94,6 +94,7 @@ public abstract class AbstractReactorHttpExchangeAdapter implements ReactorHttpE
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public <T> T exchangeForBody(HttpRequestValues requestValues, ParameterizedTypeReference<T> bodyType) {
|
||||
return (this.blockTimeout != null ?
|
||||
exchangeForBodyMono(requestValues, bodyType).block(this.blockTimeout) :
|
||||
|
||||
@@ -140,7 +140,6 @@ public class DefaultUriBuilderFactory implements UriBuilderFactory {
|
||||
* with a Map of variables.
|
||||
* @param defaultUriVariables default URI variable values
|
||||
*/
|
||||
@SuppressWarnings("NullAway") // https://github.com/uber/NullAway/issues/1126
|
||||
public void setDefaultUriVariables(@Nullable Map<String, ? extends @Nullable Object> defaultUriVariables) {
|
||||
if (defaultUriVariables != null) {
|
||||
if (this.defaultUriVariables == null) {
|
||||
@@ -432,7 +431,6 @@ public class DefaultUriBuilderFactory implements UriBuilderFactory {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("NullAway") // https://github.com/uber/NullAway/issues/1126
|
||||
public URI build(Map<String, ?> uriVars) {
|
||||
if (!CollectionUtils.isEmpty(defaultUriVariables)) {
|
||||
Map<String, Object> map = new HashMap<>(defaultUriVariables.size() + uriVars.size());
|
||||
@@ -448,7 +446,6 @@ public class DefaultUriBuilderFactory implements UriBuilderFactory {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("NullAway") // https://github.com/uber/NullAway/issues/1126
|
||||
public URI build(@Nullable Object... uriVars) {
|
||||
if (ObjectUtils.isEmpty(uriVars) && !CollectionUtils.isEmpty(defaultUriVariables)) {
|
||||
return build(Collections.emptyMap());
|
||||
|
||||
Reference in New Issue
Block a user