Skip to content

Commit 438effc

Browse files
committed
Comment out unnecessary overrides
1 parent 9d7f02e commit 438effc

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

src/main/java/com/fasterxml/classmate/types/ResolvedRecursiveType.java

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -151,19 +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-
// [classmate#117]: Do NOT compare _referencedType to avoid infinite recursion
158-
// super.equals() already compares class type, erased type, and type bindings,
159-
// which is sufficient for determining equality of recursive types.
160-
// Comparing _referencedType causes StackOverflowError when comparing types
161-
// from different TypeResolver instances.
162164
return super.equals(o);
163165
}
166+
*/
164167

165168
// Only for compliance purposes: lgtm.com complains if only equals overridden
166-
@Override public int hashCode() {
167-
return super.hashCode();
168-
}
169+
// 02-Jan-2026, tatu: No longer, base impl is fine
170+
// @Override public int hashCode() { return super.hashCode(); }
169171
}

0 commit comments

Comments
 (0)