leangen / geantyref

Advanced generic type reflection library with support for working with AnnotatedTypes (for Java 8+)
Apache License 2.0
99 stars 15 forks source link

ParameterizedTypeImpl `toString()` method returns wrong method name for nested classes #24

Closed hgschmie closed 7 months ago

hgschmie commented 7 months ago

Consider this:

Screenshot 2024-01-19 at 12 17 55

While the ParameterizedTypeImpl (which is part of geantryref) returns io.leangen.geantyref.Issue20Test.UnitX<io.leangen.geantyref.Issue20Test$QuantityX>, the actual class name is io.leangen.geantyref.Issue20Test$UnitX as UnitX is a nested class within the Issue20Test class. But the toString() method omits the $ as a marker for a nested class and uses a .

kaqqao commented 7 months ago

Similar to #23, this is a result of changes in Java itself... While there is no spec for these strings and JDK is free to change them, it is mind boggling to me that they actually do.