Simsilica/SiO2

EntityContainer doesn't support nested parametrized types

MeFisto94 opened this issue · 4 comments

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)

Hi,
Yet any plan to add support for this ?
Thought to remind it :)

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.

Should be fixed now in this commit : 75decab
I think we can close this now @MeFisto94