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

Already on GitHub? Sign in to your account

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

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

Comments

Projects
None yet
1 participant

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);
}
```

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