TouchBoarder/weekdays-buttons-bar

Callback in start method isn't nullable

omarshawky15 opened this issue · 0 comments

in public WeekdaysDataSource start(@Nullable WeekdaysDataSource.Callback callback), it says it can be null according to @nullable but whenever I provide null as parameter I get this NullPointerException if I clicked any day, so how is it Nullable ?


AndroidRuntime: FATAL EXCEPTION: main
    java.lang.NullPointerException
        at com.touchboarder.weekdaysbuttons.WeekdaysDataSource$1$1.onClick(WeekdaysDataSource.java:709)
        at android.view.View.performClick(View.java:4476)
        at android.view.View$PerformClick.run(View.java:18795)
        at android.os.Handler.handleCallback(Handler.java:730)
        at android.os.Handler.dispatchMessage(Handler.java:92)
        at android.os.Looper.loop(Looper.java:177)
        at android.app.ActivityThread.main(ActivityThread.java:5493)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:525)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1225)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1041)
        at dalvik.system.NativeStart.main(Native Method)

what I am trying to do as I don't need the callback:

WeekdaysDataSource weekdaysDataSource = new WeekdaysDataSource(mainActivity, R.id.add_new_trigger_weekdays_stub)
                .setNumberOfLetters(2)
                .setFirstDayOfWeek(Calendar.SUNDAY)
                .start(null);