Skip to content

Issue with equals(…)/hashCode() for ResolvableType.forRawClass(…) #28608

Closed
@odrotbohm

Description

@odrotbohm
Member

ResolvableType.forRawClass(…) returns an anonymous subclass of ResolvableType that alters its behavior but does not override equals(…)/hashCode() so that instances created through that method are considered the same as ones created via forClass(…) despite different behavior when trying to resolve generics. This fundamentally breaks the ability to use ResolvableType instances that are potentially created in both ways as map or cache keys.

Activity

added
in: coreIssues in core modules (aop, beans, core, context, expression)
on Jun 12, 2022
added this to the Triage Queue milestone on Jun 12, 2022
self-assigned this
on Jun 14, 2022
modified the milestones: Triage Queue, 6.0.x on Jun 14, 2022
modified the milestones: 6.0.x, 6.1.x on Feb 14, 2023
modified the milestones: 6.1.x, 6.1.0-M2 on Jul 9, 2023
added a commit that references this issue on Sep 9, 2024
6b1fbc9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @sbrannen@odrotbohm@jhoeller@spring-projects-issues

      Issue actions

        Issue with `equals(…)`/`hashCode()` for `ResolvableType.forRawClass(…)` · Issue #28608 · spring-projects/spring-framework