Skip to content

Commit b4af397

Browse files
committed
fix: NullAway warnings
Signed-off-by: Piotr P. Karwasz <piotr@github.copernik.eu>
1 parent 9139fe9 commit b4af397

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

core/spring-boot/src/main/java/org/springframework/boot/logging/log4j2/Log4J2RuntimeHints.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
package org.springframework.boot.logging.log4j2;
1818

19+
import org.jspecify.annotations.Nullable;
20+
1921
import org.springframework.aot.hint.RuntimeHints;
2022
import org.springframework.aot.hint.RuntimeHintsRegistrar;
2123
import org.springframework.util.ClassUtils;
@@ -28,7 +30,7 @@
2830
class Log4J2RuntimeHints implements RuntimeHintsRegistrar {
2931

3032
@Override
31-
public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
33+
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
3234
if (!ClassUtils.isPresent(Log4J2LoggingSystem.Factory.LOG4J_CORE_CONTEXT_FACTORY, classLoader)) {
3335
return;
3436
}
@@ -58,7 +60,7 @@ public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
5860
* @param classLoader the class loader to use for type resolution
5961
* @param typeName the name of the type to register
6062
*/
61-
private void registerTypeForReachability(RuntimeHints hints, ClassLoader classLoader, String typeName) {
63+
private void registerTypeForReachability(RuntimeHints hints, @Nullable ClassLoader classLoader, String typeName) {
6264
hints.reflection().registerTypeIfPresent(classLoader, typeName);
6365
}
6466

0 commit comments

Comments
 (0)