EntityContainer doesn't support nested parametrized types
MeFisto94 opened this issue · 4 comments
MeFisto94 commented
Using
public class RigidBodyContainer extends EntityContainer<Tuple<Spatial, RigidBodyControl>>
leads to the following Exception:
java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to java.lang.Class
at com.simsilica.es.EntityContainer.<init>(EntityContainer.java:96)
at com.simsilica.es.EntityContainer.<init>(EntityContainer.java:83)
at de.darkigames.TheSlaughter.EntitySystem.Util.RigidBodyContainer.<init>(RigidBodyContainer.java:26)
Ali-RS commented
Hi,
Yet any plan to add support for this ?
Thought to remind it :)
assofohdz commented
Just linking to a hub post here https://hub.jmonkeyengine.org/t/sio2-entitycontainer-and-parameterizedtype-exception/39182
MeFisto94 commented
Looks like the workaround to this problem was only posted on the hub.
A simple dummy class class A extends Tuple<Spatial, RigidBodyControl>
should do the trick, iirc.
Ali-RS commented
Should be fixed now in this commit : 75decab
I think we can close this now @MeFisto94