SEC-1121: InMemoryResource.equals() is wrong #1373

Closed
spring-issuemaster opened this Issue Mar 16, 2009 · 1 comment

1 participant

@spring-issuemaster

David Gageot (Migrated from SEC-1121) said:

Here is org.springframework.security.util.InMemoryResource.equals method code:

public boolean equals(Object res) { if (res instanceof InMemoryResource) { return false; } return Arrays.equals(source, ((InMemoryResource)res).source); }

Obviously, this should be:

public boolean equals(Object res) { if (!(res instanceof InMemoryResource)) { return false; } return Arrays.equals(source, ((InMemoryResource)res).source); }
@spring-issuemaster

Luke Taylor said:

Thanks for spotting this. Fixed in trunk.

@spring-issuemaster spring-issuemaster added this to the 3.0.0 M1 milestone Feb 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment