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

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

Comments

Projects
None yet
2 participants
@Rizen59
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

This comment has been minimized.

Show comment
Hide comment
@sbordes

sbordes Aug 31, 2015

Member

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....

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

This comment has been minimized.

Show comment
Hide comment
@Rizen59

Rizen59 Aug 31, 2015

Contributor

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

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@sbordes

sbordes Aug 31, 2015

Member

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

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

This comment has been minimized.

Show comment
Hide comment

@sbordes sbordes closed this Sep 1, 2015

@Rizen59

This comment has been minimized.

Show comment
Hide comment
@Rizen59

Rizen59 Sep 1, 2015

Contributor

Great and fast job as usual ! :D

Contributor

Rizen59 commented Sep 1, 2015

Great and fast job as usual ! :D

@sbordes

This comment has been minimized.

Show comment
Hide comment
@sbordes

sbordes Sep 1, 2015

Member

Thanks!

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