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

AndFilter and OrFilter have broken equals() and hashCode() contract #19

Closed
rolfl opened this issue Aug 21, 2011 · 0 comments
Closed

AndFilter and OrFilter have broken equals() and hashCode() contract #19

rolfl opened this issue Aug 21, 2011 · 0 comments
Milestone

Comments

@rolfl
Copy link
Collaborator

rolfl commented Aug 21, 2011

OrFilter and AndFilter should not break hashCode() and equals() contract.

For example:

ElementFilter efa = new ElementFilter("a");
ElementFilter efb = new ElementFilter("b");

OrFilter orfa = efa.or(efb);
OrFilter orfb = efb.or(efa);

// the following succeeds
assertTrue(orfa.equals(orfb));
// the following fails.
assertTrue(orfa.hashCode() == orfb.hashCode());

Re-Enable JUnit tests in AbstractTestFilter once fixed.

rolfl added a commit that referenced this issue Aug 21, 2011
@rolfl rolfl closed this as completed in 845cb5a Sep 28, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant