tw_rlx
12/28/2017, 3:42 PM@Nullable to public Context getContext())
I have method getUserComponent(context: Context): UserComponent, which is used inside onCreate across whole app.
1. First solution is to add !! everywhere
App.getUserComponent(context!!)
But i can't look at all this !! without disgust feeling
2. Second is to make context param of getUserComponent nullable and fire exception in case of null
fun getUserComponent(context: Context?) = context!!.getApp().legacyAppComponent
Is that ok to allow method to take nullable param, but throw exception in this case?