This statement will never be executed.
The surrounding code makes it impossible for this statement to ever be executed.
Example: The condition for the second if
statement is impossible to satisfy. It requires that the variable s
be non-null, while on the only path where s
can be assigned a non-null value there is a return
statement.
String s = null;
if (b) {
s = "Yes";
return;
}
if (s != null) {
Dead();
}
[1] Standards Mapping - Security Technical Implementation Guide Version 3 - (STIG 3) APP3050 CAT II
[2] Standards Mapping - Common Weakness Enumeration - (CWE) CWE ID 561