TNG / ArchUnit

A Java architecture test library, to specify and assert architecture rules in plain Java
http://archunit.org
Apache License 2.0
3.19k stars 289 forks source link

fix `getAllInvolvedRawTypes()` recursing infinitely #1276

Closed codecholeric closed 5 months ago

codecholeric commented 6 months ago

This fixes the problem of recursing infinitely when calling JavaType.getAllInvolvedRawTypes() for a recursive type parameter declaration (e.g. class Example<T extends Example<T>>). It also adds a new public API to conveniently traverse JavaType signatures without the need to add chains of instanceof checks and manually handle how to traverse further.

Resolves: #1237