SuppressWarning for: Boolean method 'methodName' is always inverted

mega

New Member
#1
The list of the most commoon SuppressWarning annotations is so long and non-intuitive, that I am lost to find a correct annotation for warning
Boolean method 'methodName' is always inverted
I don't want to change the method to return a negative value, since there is a logic consistency in the naming - e.g. method name is: hasFlag(...).

What is the right annotation for this type of Lint Analysis warning?
 

Admin

Administrator
Thành viên BQT
#2
Mã:
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
You can discover these with the help of Android Studio. Expand the quick fix menu (alt+enter on my computer) and then choose one of the suppress quick fixes.
 
Top