gre / gl-react-native-v2

DEPRECATED, Please migrate to latest version of gl-react-native that works nicely with expo-gl and unimodules

Home Page:https://github.com/gre/gl-react

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[GLCanvasManager] unchecked or unsafe operations

st0ffern opened this issue · comments

Reports from Android when building with lastest versions of gl-react and gl-react-native..
RNGL\GLCanvasManager.java uses unchecked or unsafe operations.

latest version, you mean still in the 2.x major?

Sorry for not commenting on version gl-react-native v2.42.1 gl-react = latest npm version

apparently this is triggered by https://github.com/ProjectSeptemberInc/gl-react-native/blob/master/android/src/main/java/com/projectseptember/RNGL/GLCanvasManager.java#L109 which returns an unsafe type Map . the actual returned type is Map<String,Map<String,String>> but the overrided method is a Map<String,Object> so we can only put Map there, even if it's unsafe.. I'm not sure why the overrided method is not that type..

in react native code, they also just use the unsafe Map so i'm going to stick to that for now https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/ReactViewPagerManager.java#L59

it's just a lint warning , not preventing to build, right?

nice 😉
yes its just a warning. build works fine! I just think that warnings should be read 😄