Skip to content

Commit b97cc46

Browse files
christophstroblmp911de
authored andcommitted
Move off deprecated API in AOT support.
Closes #3305 Original pull request: #3307
1 parent 9ce25da commit b97cc46

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

src/main/java/org/springframework/data/repository/aot/hint/RepositoryRuntimeHints.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader)
9292

9393
//
9494
hints.reflection().registerType(Throwable.class,
95-
builder -> builder.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS, MemberCategory.DECLARED_FIELDS));
95+
builder -> builder.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS, MemberCategory.ACCESS_DECLARED_FIELDS));
9696

9797
// SpEL support
9898
hints.reflection().registerType(

src/main/java/org/springframework/data/repository/config/RepositoryRegistrationAotContribution.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,7 @@ private void contributeRepositoryInfo(AotRepositoryContext repositoryContext, Ge
332332

333333
// Kotlin
334334
if (isKotlinCoroutineRepository(repositoryContext, repositoryInformation)) {
335-
contribution.getRuntimeHints().reflection().registerTypes(kotlinRepositoryReflectionTypeReferences(),
336-
hint -> hint.withMembers(MemberCategory.INTROSPECT_PUBLIC_METHODS));
335+
contribution.getRuntimeHints().reflection().registerTypes(kotlinRepositoryReflectionTypeReferences(), hint -> {});
337336
}
338337

339338
// Repository query methods

src/main/java/org/springframework/data/util/QTypeContributor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public static void contributeEntityPath(Class<?> type, GenerationContext context
5656
logger.debug("Registering Q type %s for %s.");
5757
context.getRuntimeHints().reflection().registerType(TypeReference.of(queryClassName),
5858
MemberCategory.INVOKE_PUBLIC_METHODS, MemberCategory.INVOKE_DECLARED_CONSTRUCTORS,
59-
MemberCategory.INTROSPECT_DECLARED_METHODS, MemberCategory.DECLARED_FIELDS);
59+
MemberCategory.ACCESS_DECLARED_FIELDS);
6060
} else {
6161
logger.debug("Skipping Q type %s. Not an EntityPath.");
6262
}

src/main/java/org/springframework/data/util/TypeContributor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public static void contribute(Class<?> type, Predicate<Class<? extends Annotatio
6262
if (type.isAnnotation() && filter.test((Class<? extends Annotation>) type)) {
6363

6464
contribution.getRuntimeHints().reflection().registerType(type,
65-
hint -> hint.withMembers(MemberCategory.INTROSPECT_PUBLIC_METHODS));
65+
hint -> {});
6666

6767
return;
6868
}

0 commit comments

Comments
 (0)