Closed GoogleCodeExporter closed 9 years ago
I am not able to reproduce the problem, but probably I am missing something.
Could
you please attach the whole test case, including the SomeClass class and how you
create the SomeClass objects that you put in the list to be grouped?
Original comment by mario.fu...@gmail.com
on 21 Apr 2010 at 7:20
I faced the same problem. Here the test method I've added to TypedGroupByTest
class:
@Test
public void testGroupByAgeAndNameIterate() {
List<Person> meAndMyFriends = asList(me, luca, biagio, celestino);
Group<Person> group = group(meAndMyFriends, by(on(Person.class).getAge()),
by(on(Person.class).getFirstName()));
for(Group<Person> subgroup:group.subgroups()){
assertNotNull(subgroup.findAll());
}
}
Original comment by andrei.b...@gmail.com
on 11 May 2010 at 4:51
Attachments:
The previous test case produces the following exception:
java.lang.ClassCastException: ch.lambdaj.mock.Person cannot be cast to
ch.lambdaj.group.Group
at
ch.lambdaj.group.TypedGroupByTest.testGroupByAgeAndNameIterate(TypedGroupByTest.
java:11
1)
Original comment by andrei.b...@gmail.com
on 11 May 2010 at 4:55
Fixed in release 2.3
Thank you to Andrey Belyaev for the fix
Original comment by mario.fu...@gmail.com
on 21 May 2010 at 2:33
Original issue reported on code.google.com by
stmit...@gmail.com
on 21 Apr 2010 at 6:52