In my code I have many warnings for “dead code”.
The problem is that I have code like this one
public void myMethod(final String text) {
if(CONST_FLAG && something == true) {
doMyMethod(text);
}
}
CONST_FLAG is a build-configuration const. When CONST_FLAG is false I get the warning for the dead code. If I say that I want to suppress the warning I see a warning for an “unnecessary suppress” when the flag is true.
Is there a way to avoid it?
Cant you do the work in else part when your CONST_FLAG is false. Like this
when you say like below I’m geting dead code warning
But like below I’m not getting that warning,