process-aot fail when dealing with anonymous classes #29778
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: duplicate
A duplicate of another issue
theme: aot
An issue related to Ahead-of-time processing
After checking the code, the clazz pointed to by
ReflectionTypeReference
iscom.google.gson.FieldNamingPolicy$1
which is an anonymous class,So,
getCanonicalName()
returnnull
. Then, AbstractTypeReference's equals() function throw NPE.because equals() fail, Map.computIfAbsent() fail
ReflectionHints's registerType function fail
after re-check my code,i found I incorrectly included a Gson instance in the entity data class, caused the above exception
But I still think this part of logic is problematic, shouldSkipType() seems to filter out anonymous classes
The text was updated successfully, but these errors were encountered: