Consistent RuntimeHintsRegistrar signature (plus related polishing)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -21,11 +21,12 @@ import java.util.Collections;
|
||||
import org.springframework.aot.hint.ExecutableMode;
|
||||
import org.springframework.aot.hint.RuntimeHints;
|
||||
import org.springframework.aot.hint.RuntimeHintsRegistrar;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* {@link RuntimeHintsRegistrar} implementation that registers reflection hints for
|
||||
* {@code EmbeddedDataSourceProxy#shutdown} in order to allow it to be used as a bean
|
||||
* destroy method.
|
||||
* {@link RuntimeHintsRegistrar} implementation that registers reflection hints
|
||||
* for {@code EmbeddedDataSourceProxy#shutdown} in order to allow it to be used
|
||||
* as a bean destroy method.
|
||||
*
|
||||
* @author Sebastien Deleuze
|
||||
* @since 6.0
|
||||
@@ -33,7 +34,7 @@ import org.springframework.aot.hint.RuntimeHintsRegistrar;
|
||||
class EmbeddedDatabaseFactoryRuntimeHints implements RuntimeHintsRegistrar {
|
||||
|
||||
@Override
|
||||
public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
|
||||
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
|
||||
hints.reflection().registerTypeIfPresent(classLoader,
|
||||
"org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseFactory$EmbeddedDataSourceProxy",
|
||||
builder -> builder
|
||||
|
||||
Reference in New Issue
Block a user