I have this andorid code:
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
//some code
super.onMeasure(widthMeasureSpec,heightMeasureSpec);
..
}
no errors.
but when I extract the last lines into a private method I get this warning which requires to add a suppression annotation to the private method.
specious method call, should probably call measure
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
...
foo(textMaxWidth);
}
private void foo(int textMaxWidth) {
...
super.onMeasure(widthMeasureSpec,heightMeasureSpec);
..
}
why is the suppression needed only after extraction?
@SuppressLint("WrongCall")