RFR: 8337142: StackOverflowError in Types.containsTypeRecursive with deeply nested type hierarchy [v2]
Vicente Romero
vromero at openjdk.org
Mon Nov 3 14:56:32 UTC 2025
On Mon, 3 Nov 2025 13:06:49 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Vicente Romero has updated the pull request incrementally with one additional commit since the last revision:
>>
>> addressing review comments
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java line 1350:
>
>> 1348: */
>> 1349: SameTypeVisitor isSameTypeVisitor = new SameTypeVisitor();
>> 1350: class SameTypeVisitor extends TypeRelation {
>
> I suggest to maybe make this an abstract class (with 2 abstract methods), then define `isSameTypeVisitor` as before, as an anonymous instance of our new abstract class, then define another equality visitor instance for type pair.
I updated the PR with this suggestion, thanks
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28101#discussion_r2486766423
More information about the compiler-dev
mailing list