Add the necessary hints for use of Cglib proxies
This commit expands GeneratedClassHandler to allow invocation of declared fields and methods. Generated proxies have a number of internal fields and methods that are invoked via reflection. See gh-28954
This commit is contained in:
@@ -54,7 +54,8 @@ class GeneratedClassHandlerTests {
|
||||
String className = "com.example.Test$$Proxy$$1";
|
||||
this.handler.accept(className, TEST_CONTENT);
|
||||
assertThat(RuntimeHintsPredicates.reflection().onType(TypeReference.of(className))
|
||||
.withMemberCategory(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS))
|
||||
.withMemberCategories(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS,
|
||||
MemberCategory.INVOKE_DECLARED_METHODS, MemberCategory.DECLARED_FIELDS))
|
||||
.accepts(this.generationContext.getRuntimeHints());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user