To keep this short, I have the following method:
public static List<AgeOfMinecraftXrefItem> FindByAgeOfMinecraftItemType(List<AgeOfMinecraftXrefItem> xrefItems, String ageOfMinecraftItemType)
{
return select(xrefItems, having(on(AgeOfMinecraftXrefItem.class).getAgeOfMinecraftItemType(), equalTo(ageOfMinecraftItemType)));
}
And when the method is invoked with a list of items and a valid item type, the following exception is thrown:
Caused by: java.lang.ClassCastException
at java.lang.Class.cast(Unknown Source)
at ch.lambdaj.proxy.ClassImposterizer.imposterise(ClassImposterizer.java
:101)
at ch.lambdaj.proxy.ProxyUtil.createProxy(ProxyUtil.java:52)
at ch.lambdaj.function.argument.ArgumentsFactory.createPlaceholder(Argum
entsFactory.java:68)
at ch.lambdaj.function.argument.ArgumentsFactory.registerNewArgument(Arg
umentsFactory.java:58)
at ch.lambdaj.function.argument.ArgumentsFactory.createArgument(Argument
sFactory.java:50)
at ch.lambdaj.function.argument.ArgumentsFactory.createArgument(Argument
sFactory.java:39)
at ch.lambdaj.Lambda.on(Lambda.java:63)
at bakersoft.ageofminecraft.data.entities.AgeOfMinecraftXrefItem.FindByA
geOfMinecraftItemType(AgeOfMinecraftXrefItem.java:95)
I have other classes that do exactly the same thing and yet I get no exception for those. This class does not extend any other class or implement any interfaces. Can someone point me in a direction here?