Nullability refinements
See gh-32475
This commit is contained in:
@@ -67,6 +67,7 @@ public class MockSpringFactoriesLoader extends SpringFactoriesLoader {
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Nullable
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
protected <T> T instantiateFactory(String implementationName, Class<T> type,
|
protected <T> T instantiateFactory(String implementationName, Class<T> type,
|
||||||
@Nullable ArgumentResolver argumentResolver, FailureHandler failureHandler) {
|
@Nullable ArgumentResolver argumentResolver, FailureHandler failureHandler) {
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ public abstract class ValueCodeGeneratorDelegates {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
|
@Nullable
|
||||||
public CodeBlock generateCode(ValueCodeGenerator valueCodeGenerator, Object value) {
|
public CodeBlock generateCode(ValueCodeGenerator valueCodeGenerator, Object value) {
|
||||||
if (this.collectionType.isInstance(value)) {
|
if (this.collectionType.isInstance(value)) {
|
||||||
T collection = (T) value;
|
T collection = (T) value;
|
||||||
@@ -135,6 +136,7 @@ public abstract class ValueCodeGeneratorDelegates {
|
|||||||
private static final CodeBlock EMPTY_RESULT = CodeBlock.of("$T.emptyMap()", Collections.class);
|
private static final CodeBlock EMPTY_RESULT = CodeBlock.of("$T.emptyMap()", Collections.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Nullable
|
||||||
public CodeBlock generateCode(ValueCodeGenerator valueCodeGenerator, Object value) {
|
public CodeBlock generateCode(ValueCodeGenerator valueCodeGenerator, Object value) {
|
||||||
if (value instanceof Map<?, ?> map) {
|
if (value instanceof Map<?, ?> map) {
|
||||||
if (map.isEmpty()) {
|
if (map.isEmpty()) {
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ package org.springframework.aot.hint.support;
|
|||||||
|
|
||||||
import org.springframework.aot.hint.RuntimeHints;
|
import org.springframework.aot.hint.RuntimeHints;
|
||||||
import org.springframework.aot.hint.RuntimeHintsRegistrar;
|
import org.springframework.aot.hint.RuntimeHintsRegistrar;
|
||||||
|
import org.springframework.lang.Nullable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link RuntimeHintsRegistrar} to register hints for {@link org.springframework.core.SpringProperties}.
|
* {@link RuntimeHintsRegistrar} to register hints for {@link org.springframework.core.SpringProperties}.
|
||||||
@@ -28,7 +29,7 @@ import org.springframework.aot.hint.RuntimeHintsRegistrar;
|
|||||||
class SpringPropertiesRuntimeHints implements RuntimeHintsRegistrar {
|
class SpringPropertiesRuntimeHints implements RuntimeHintsRegistrar {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
|
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
|
||||||
hints.resources().registerPattern("spring.properties");
|
hints.resources().registerPattern("spring.properties");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ final class UnmodifiableMultiValueMap<K,V> implements MultiValueMap<K,V>, Serial
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Nullable
|
||||||
public V getFirst(K key) {
|
public V getFirst(K key) {
|
||||||
return this.delegate.getFirst(key);
|
return this.delegate.getFirst(key);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user