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

Fix endless recursion for recursive types #22

Closed hgschmie closed 7 months ago

hgschmie commented 7 months ago

If a type is defined as Foo<Q extends Foo<Q>>, there was a stack overflow error (endless recursion) when trying to reduce bounds on such a type.

As there is no really good answer (see https://github.com/leangen/geantyref/issues/20 for discussion), short-cut the recursion and return the raw type.

kaqqao commented 7 months ago

While testing this, I found another bug in how capture conversion deals with annotations... I'll release this as soon as I figure that out.