CodeCombiner / native-android

GC Native Android
GNU General Public License v3.0
3 stars 1 forks source link

Exception/warning in casting one type to another #90

Closed rampr closed 5 years ago

rampr commented 5 years ago

Might not be an important issue

Stacktrace:

4-12 17:42:34.447  6872  6872 W Bundle  : Attempt to cast generated internal exception:
04-12 17:42:34.447  6872  6872 W Bundle  : java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
04-12 17:42:34.447  6872  6872 W Bundle  :  at android.os.BaseBundle.getBoolean(BaseBundle.java:905)
04-12 17:42:34.447  6872  6872 W Bundle  :  at com.tealeaf.plugin.plugins.LocalNotifyPlugin.setupChannel(LocalNotifyPlugin.java:435)
04-12 17:42:34.447  6872  6872 W Bundle  :  at com.tealeaf.plugin.plugins.LocalNotifyPlugin.onCreate(LocalNotifyPlugin.java:482)
04-12 17:42:34.447  6872  6872 W Bundle  :  at java.lang.reflect.Method.invoke(Native Method)
04-12 17:42:34.447  6872  6872 W Bundle  :  at com.tealeaf.plugin.PluginManager.invokeMethod(PluginManager.java:228)
04-12 17:42:34.447  6872  6872 W Bundle  :  at com.tealeaf.plugin.PluginManager.callAll(PluginManager.java:263)
04-12 17:42:34.447  6872  6872 W Bundle  :  at com.tealeaf.TeaLeaf.onCreate(TeaLeaf.java:263)
04-12 17:42:34.447  6872  6872 W Bundle  :  at com.hashcube.sqmtest.sqmtestActivity.onCreate(sqmtestActivity.java:13)
04-12 17:42:34.447  6872  6872 W Bundle  :  at android.app.Activity.performCreate(Activity.java:7149)
04-12 17:42:34.447  6872  6872 W Bundle  :  at android.app.Activity.performCreate(Activity.java:7140)
04-12 17:42:34.447  6872  6872 W Bundle  :  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1288)
04-12 17:42:34.447  6872  6872 W Bundle  :  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3017)
04-12 17:42:34.447  6872  6872 W Bundle  :  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3172)
04-12 17:42:34.447  6872  6872 W Bundle  :  at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
04-12 17:42:34.447  6872  6872 W Bundle  :  at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
04-12 17:42:34.447  6872  6872 W Bundle  :  at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
04-12 17:42:34.447  6872  6872 W Bundle  :  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1906)
04-12 17:42:34.447  6872  6872 W Bundle  :  at android.os.Handler.dispatchMessage(Handler.java:106)
04-12 17:42:34.447  6872  6872 W Bundle  :  at android.os.Looper.loop(Looper.java:193)
04-12 17:42:34.447  6872  6872 W Bundle  :  at android.app.ActivityThread.main(ActivityThread.java:6863)
04-12 17:42:34.447  6872  6872 W Bundle  :  at java.lang.reflect.Method.invoke(Native Method)
04-12 17:42:34.447  6872  6872 W Bundle  :  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
04-12 17:42:34.447  6872  6872 W Bundle  :  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
04-12 17:42:34.447  6872  6872 W Bundle  : Key LOCALNOTIFY_SHOW_BADGE expected Boolean but value was a java.lang.String.  The default value false was returned.
04-12 17:42:34.448  6872  6872 W Bundle  : Attempt to cast generated internal exception:
04-12 17:42:34.448  6872  6872 W Bundle  : java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
04-12 17:42:34.448  6872  6872 W Bundle  :  at android.os.BaseBundle.getBoolean(BaseBundle.java:905)
04-12 17:42:34.448  6872  6872 W Bundle  :  at com.tealeaf.plugin.plugins.LocalNotifyPlugin.setupChannel(LocalNotifyPlugin.java:436)
04-12 17:42:34.448  6872  6872 W Bundle  :  at com.tealeaf.plugin.plugins.LocalNotifyPlugin.onCreate(LocalNotifyPlugin.java:482)
04-12 17:42:34.448  6872  6872 W Bundle  :  at java.lang.reflect.Method.invoke(Native Method)
04-12 17:42:34.448  6872  6872 W Bundle  :  at com.tealeaf.plugin.PluginManager.invokeMethod(PluginManager.java:228)
04-12 17:42:34.448  6872  6872 W Bundle  :  at com.tealeaf.plugin.PluginManager.callAll(PluginManager.java:263)
04-12 17:42:34.448  6872  6872 W Bundle  :  at com.tealeaf.TeaLeaf.onCreate(TeaLeaf.java:263)
04-12 17:42:34.448  6872  6872 W Bundle  :  at com.hashcube.sqmtest.sqmtestActivity.onCreate(sqmtestActivity.java:13)
04-12 17:42:34.448  6872  6872 W Bundle  :  at android.app.Activity.performCreate(Activity.java:7149)
04-12 17:42:34.448  6872  6872 W Bundle  :  at android.app.Activity.performCreate(Activity.java:7140)
04-12 17:42:34.448  6872  6872 W Bundle  :  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1288)
04-12 17:42:34.448  6872  6872 W Bundle  :  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3017)
04-12 17:42:34.448  6872  6872 W Bundle  :  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3172)
04-12 17:42:34.448  6872  6872 W Bundle  :  at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
04-12 17:42:34.448  6872  6872 W Bundle  :  at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
04-12 17:42:34.448  6872  6872 W Bundle  :  at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
04-12 17:42:34.448  6872  6872 W Bundle  :  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1906)
04-12 17:42:34.448  6872  6872 W Bundle  :  at android.os.Handler.dispatchMessage(Handler.java:106)
04-12 17:42:34.448  6872  6872 W Bundle  :  at android.os.Looper.loop(Looper.java:193)
04-12 17:42:34.448  6872  6872 W Bundle  :  at android.app.ActivityThread.main(ActivityThread.java:6863)
04-12 17:42:34.448  6872  6872 W Bundle  :  at java.lang.reflect.Method.invoke(Native Method)
04-12 17:42:34.448  6872  6872 W Bundle  :  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
04-12 17:42:34.448  6872  6872 W Bundle  :  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
CodeCombiner commented 5 years ago

This is parse error log. The function prints error when tries to cast empty string to boolean but the function itself works fine. Default value "false" should be provided to get rid of parse error printing.

rampr commented 5 years ago

@CodeCombiner Should we then make the change to resolve this ?