intellij idea - Android Studio nullability annoying warning -
the problem:
@nullable private view view; public dosomethingwithview() { checknotnull(view); //<- throws npe if parameter null view.showwarningaboutissue(); //<- ide reports possible null here } is there way configure ide, doesn't report possible npe on second line?
update: i'm using dagger checknotnull method identical guava ones. if change import dagger guava ide removes warning.
update #2 latest update of android studio can not reproduce anymore
you need add following comment before view.showwarningaboutissue() statement:
//noinspection constantconditions this can performed gui : alt+enter (or "bubblelight" menu), choose assert view!=null , suppress statement:

Comments
Post a Comment