Infinite Loop when validating custom type constraint under certain inheritance scheme

Description

There is an infinite loop occurring in TypeHelper.normalize(). The issue seems to occur any time a parameterized supertype is passed into TypeHelper.isAssignable.

I was able to see that in my test cases, ParameterizedType.getActualTypeArguments() is returning the same exact object as Class.getTypeParameters()... which causes TypeHelper to create a map with an entry where Key = Value. Given the logic in TypeHelper.normalize(), this in turn causes an infinite loop.

I've attached a couple of test cases which illustrate the issue, copied below.

Environment

None

Assignee

Guillaume Smet

Reporter

Daniel Shaver

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Affects versions

Priority

Minor
Configure