I'm trying new MvpNullObjectBasePresenter from mosby3 and behavior for getView() is different now from old version.
Before it would throw NullPointerException only if view was never attached. I think this behavior is very useful, since you should attach view before you can use it. And if you attached it at least once it is not going to crash but returns proxy object.
What happens now is we always return proxy, this makes it much harder to debug. Since it will look like everything is fine, even though you never called attachView().
I'm trying new
MvpNullObjectBasePresenter
from mosby3 and behavior forgetView()
is different now from old version.Before it would throw
NullPointerException
only if view was never attached. I think this behavior is very useful, since you should attach view before you can use it. And if you attached it at least once it is not going to crash but returns proxy object.What happens now is we always return proxy, this makes it much harder to debug. Since it will look like everything is fine, even though you never called
attachView()
.