Fix previous commit for 6.2.x compatibility

See gh-35674
This commit is contained in:
Sam Brannen
2025-10-21 15:37:35 +02:00
parent 506b76032f
commit bccfbfd630
2 changed files with 4 additions and 4 deletions
@@ -18,15 +18,15 @@ package org.springframework.jdbc.support;
import java.sql.Types;
import org.jspecify.annotations.Nullable;
import org.springframework.aot.hint.MemberCategory;
import org.springframework.aot.hint.RuntimeHints;
import org.springframework.aot.hint.RuntimeHintsRegistrar;
import org.springframework.lang.Nullable;
/**
* {@link RuntimeHintsRegistrar} implementation that registers runtime hints for
* {@link JdbcUtils}.
*
* @author Brian Clozel
* @since 6.2.13
*/
@@ -34,7 +34,7 @@ class JdbcUtilsRuntimeHints implements RuntimeHintsRegistrar {
@Override
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
hints.reflection().registerType(Types.class, MemberCategory.ACCESS_PUBLIC_FIELDS);
hints.reflection().registerType(Types.class, MemberCategory.PUBLIC_FIELDS);
}
}
@@ -48,7 +48,7 @@ class JdbcUtilsRuntimeHintsTests {
void sqlTypesShouldHaveFieldAccess() {
for (Field field : Types.class.getFields()) {
assertThat(RuntimeHintsPredicates.reflection()
.onFieldAccess(field)).accepts(this.hints);
.onField(field)).accepts(this.hints);
}
}