Wrong exception type thrown in GWT backend ReflectionCache.forName
See original GitHub issueDocumentation for reflect.ClassReflection.forName
states that it throws ReflectionException
and does so in native java implementation
https://github.com/libgdx/libgdx/blob/0acff984c84cf7a8765603865dadbe7ba987c8cd/gdx/src/com/badlogic/gdx/utils/reflect/ClassReflection.java#L29-L31
However, the GWT implementation throws a RuntimeException
https://github.com/libgdx/libgdx/blob/0acff984c84cf7a8765603865dadbe7ba987c8cd/backends/gdx-backends-gwt/src/com/badlogic/gwtref/client/ReflectionCache.java#L49-L51
This is an inconsistency and GWTs implementation should follow the doc.
This can probably be fixed by gwt reflection cache throwing a ClassNotFoundException
, which would get caught by
https://github.com/libgdx/libgdx/blob/0acff984c84cf7a8765603865dadbe7ba987c8cd/backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/utils/reflect/ClassReflection.java#L30-L34
Please select the affected platforms
- Android
- iOS
- HTML/GWT
- Windows
- Linux
- macOS
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
I can, PR incoming sometime then.
This should be an easy change, do you want to file a PR @nojus297