S5411 FP when instanceOf is used on Boxed variable

Windows Eclipse SonarLint pugin 7.9.0.66038 for java

The documentation states that S5411 will NOT be raised if already checked for null
The following code is doing a null check via ‘instanceOf’ but the issue is still reported.

if(value instanceof Boolean)
valueString = (Boolean)value ? “TRUE” : “FALSE”;

Hey there.

Is the issue still raised with the latest version of SonarLint for Eclipse, v7.11?

Yes, it still occurs with the latest version of SonarLint for Eclipse, v7.11

Is there any update on this?

Hey Kevin,

This is a duplicate of this report: S5411 FP after doing a null check. I answered it there.

Cheers,
Marco

The reply on Jun 9 indicated this was a duplicate of S5411 FP after doing a null check

I now using version 8.0 of SonarLint and the 91513 issue, of which this was marked as a duplicate, seems fixed but this one is NOT fixed in 8.0. So I think SONARJAVA-S5411 fixed when explicitly checking for a null but not when doing an ‘instanceOf’. Please address. Thanks