Skip to content

Cglib2AopProxy should have an HashCodeInterceptor [SPR-2234] #6924

Closed
@spring-projects-issues

Description

@spring-projects-issues

Christopher Sahnwaldt opened SPR-2234 and commented

The proxy created by Cglib2AopProxy handles calls to equals() with an EqualsInterceptor, but calls to hashCode() are handled by the advisors. Shouldn't there also be a HashCodeInterceptor that handles calls to hashCode()? Otherwise, two proxies for which equals() returns true may have different hash codes.

JdkDynamicAopProxy is different - it intercepts equals() and handles it itself (just like Cglib2AopProxy), but it also intercepts hashCode() and handles it itself.

I only browsed the code, though. Maybe I missed something and Cglib2AopProxy is correct.


Affects: 2.0 RC1

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions