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

Equality between multitonKey and ClassKey (with same classField) #165

Closed
Rizen59 opened this issue Aug 31, 2015 · 6 comments
Closed

Equality between multitonKey and ClassKey (with same classField) #165

Rizen59 opened this issue Aug 31, 2015 · 6 comments
Assignees
Labels
Milestone

Comments

@Rizen59
Copy link
Contributor

Rizen59 commented Aug 31, 2015

Hi Seb' !

Here is a small unit test that show a potential bug in the ClassKey's equals method.
The both keys will be considered as equals in 8.0.3.

@Test
public void testThatClassKeyIsNotEqualsToMultitonKey() {
    UniqueKey<DefaultModel> key2 = Key.create(DefaultModel.class);
    UniqueKey<DefaultModel> key3 = Key.create(DefaultModel.class, new Object());
    Assert.assertFalse(key2.equals(key3));
}
@sbordes
Copy link
Member

sbordes commented Aug 31, 2015

Are you blocked by this (requiring 8.0.4) or can you wait next version 8.1.0.

It's due to the polymorphic equals, key3.equals(key2) will rightly return false....

@sbordes sbordes added the bug label Aug 31, 2015
@sbordes sbordes self-assigned this Aug 31, 2015
@Rizen59
Copy link
Contributor Author

Rizen59 commented Aug 31, 2015

This is not blocking by now, we will do more tests to be sure.
When do you plan the 8.1.0 ?

@sbordes sbordes added this to the 8.1.0 milestone Aug 31, 2015
@sbordes
Copy link
Member

sbordes commented Aug 31, 2015

I don't know yet depending on all expressed priorities...
But a patch could be quickly done for a hypothetical 8.0.4.

@sbordes sbordes modified the milestones: 8.1.0, Hotfix Aug 31, 2015
sbordes added a commit that referenced this issue Aug 31, 2015
@sbordes
Copy link
Member

sbordes commented Sep 1, 2015

Available within the first 8.0.4 build

http://oss.jfrog.org/oss-snapshot-local/org/jrebirth/af/core/8.0.4-SNAPSHOT/

@sbordes sbordes closed this as completed Sep 1, 2015
@Rizen59
Copy link
Contributor Author

Rizen59 commented Sep 1, 2015

Great and fast job as usual ! :D

@sbordes
Copy link
Member

sbordes commented Sep 1, 2015

Thanks!

sbordes added a commit that referenced this issue Jan 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants