@@ -151,23 +151,21 @@ public StringBuilder appendFullDescription(StringBuilder sb)
151151 /* Other overrides
152152 /**********************************************************************
153153 */
154-
155- @ Override public boolean equals (Object o )
154+
155+ // 02-Jan-2026: [classmate#117]: Do NOT compare _referencedType to avoid infinite
156+ // recursion: super.equals() already compares class type, erased type, and type
157+ // bindings, which is sufficient for determining equality of recursive types.
158+ // Comparing _referencedType causes StackOverflowError when comparing types
159+ // from different TypeResolver instances.
160+ /*
161+ @Override
162+ public boolean equals(Object o)
156163 {
157- if (!super .equals (o )) {
158- return false ;
159- }
160- // not sure if we should match at all, but definitely need this
161- // additional part if we do:
162- ResolvedRecursiveType other = (ResolvedRecursiveType ) o ;
163- if (_referencedType == null ) {
164- return other ._referencedType == null ;
165- }
166- return _referencedType .equals (other ._referencedType );
164+ return super.equals(o);
167165 }
166+ */
168167
169168 // Only for compliance purposes: lgtm.com complains if only equals overridden
170- @ Override public int hashCode () {
171- return super .hashCode ();
172- }
169+ // 02-Jan-2026, tatu: No longer, base impl is fine
170+ // @Override public int hashCode() { return super.hashCode(); }
173171}
0 commit comments