How to configure Assert/Check methods in Android Studio?
I use Mosby MVP framework, and in presenter I often use this pattern:
if (isViewAttached()) {
getView().someViewMethod();
}
getView()
marked as @Nullable
, so Android Studio shows me warning method invocation 'someViewMethod' could produce NullPointerException
. It doesn't understand thad I've checked it before.
I found brilliant answer about configuration Assert/Check methods: https://stackoverflow.com/a/19319326/1263771
But can not do it in the fresh Android Studio because it has different settings interface. So, how to do it in the last Studio?