Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Injection with Java Generics produce a MundaneWireException only in GWT #649

Open
fgnm opened this issue Dec 19, 2021 · 0 comments
Open
Assignees
Labels

Comments

@fgnm
Copy link

fgnm commented Dec 19, 2021

Hello, I use artemis with libGDX and GWT, I've noticed that a MundaneWireException is raised when the game run with GWT and there's a structure that uses generics like this example:

public class GenericObject {

}
public class SpecificObject extends GenericObject {

}
public abstract class SuperGenericClass<T extends GenericObject> {
    protected ComponentMapper<CustomComponent> componentMapper;

   public abstract T getObject();
}
public class SpecificClass extends SuperGenericClass<SpecificObject> {
    protected ComponentMapper<SpecificComponent> specificMapper;
   
    public SpecificObject getObject() {
          return new SpecificObject();
    }
}

The exception is raised when I do something like:

SuperGenericClass specificClass = new SpecificClass();
world.inject(specificClass);

The issue only happens in GWT but works on any other platforms. Using the same structure, but without generics, works also on GWT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants