- Operating system: Windows 10
- SonarLint plugin version: 9.3.0.81553
- Programming language you’re coding in: Java
- Is connected mode used: No
False Positive of Redundant Jump on the ‘return’ statement.
Does NOT generate a FP if try/finally is removed.
String x = "";
if (x.equals("fred"))
{
try
{
if (x.equals("fred"))
{
return;
}
}
finally
{
System.out.println("Always print");
}
System.out.println("Sometimes print");
}