Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SEC-311: equals(Object object) in SecurityConfig does not obey symmetry requirement of the interface contract #574

spring-issuemaster opened this issue Jul 5, 2006 · 1 comment


Copy link

@spring-issuemaster spring-issuemaster commented Jul 5, 2006

Sven Bovin(Migrated from SEC-311) said:

The SecurityConfig.equals(Object object) method violates the symmetry requirement imposed by the Object.equals(Object object) contract. If the ‘other’ Object is a String, it compares that String to the attribute String stored in the SecurityConfig.

Consider the following situation:
String myString = “CONFIG”;
SecurityConfig myConfig = new SecurityConfig(“CONFIG”);

While [code]myConfig.equals(myString)[/code] will return true, [code]myString.equals(myConfig)[/code] will return false, violating the equals symmetry.

I’ve checked the 1.1-SNAPSHOT (via and the equals method of SecurityConfig apparently has not changed.


This comment has been minimized.

Copy link

@spring-issuemaster spring-issuemaster commented Sep 14, 2006

Ben Alex said:

Fixed; also changed unit test to reflect symmetry requirement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.