Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Not A Bug
-
Affects Version/s: 1.7.4
-
Fix Version/s: 1.7.4
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
// the Card class has equals() method implemented, so this works: assert new Card("6s") == new Card("6s") // here's a list with 3 equal cards: def list = ["4c", "6s", "6s", "6s", "6c"].collect {new Card(it)} // since three cards are equal, the following is pretty much expected: assert list.clone().unique().size() == 3 // but Set doesn't recognize cards as equal: assert (list as Set).size() == 5
Since Set's definition states that it's an unordered collection of unique items, and all other statements prove that three items of this collection are not unique, I believe it's a bug.
Activity
Nikita Y Volkov
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Fix Version/s | 1.7.4 [ 16563 ] | |
| Resolution | Fixed [ 1 ] |
Paul King
made changes -
| Resolution | Fixed [ 1 ] | |
| Status | Resolved [ 5 ] | Reopened [ 4 ] |
Paul King
made changes -
| Status | Reopened [ 4 ] | Resolved [ 5 ] |
| Resolution | Not A Bug [ 6 ] |
Paul King
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |