You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Checker Framework is flagging a possible null dereference in the below code snippet, where lambdaParameters.peek() is being checked for null before it is dereferenced. This seems to be a false positive, as the code should not cause a null dereference.
New surviving error(s) found:
<checkerFrameworkErrorunstable="false">
<fileName>src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedLambdaParameterShouldBeUnnamedCheck.java</fileName>
<specifier>dereference.of.nullable</specifier>
<message>dereference of possibly-null reference lambdaParameters.peek()</message>
<lineContent>&& ast.equals(lambdaParameters.peek().enclosingLambda)) {</lineContent>
</checkerFrameworkError>
Expectations:
This issue appears to be a false positive because lambdaParameters.peek() is explicitly checked for nullity before any dereferencing occurs. The error persists even though the code logic should prevent a null dereference.
Build tool: maven
checker version: 3.46.0
The text was updated successfully, but these errors were encountered:
You've not given me enough of the code to reproduce this error. It could be that peek is not marked @SideEffectFree so lambdaParameters.peek() is unrefined.
The Checker Framework is flagging a possible null dereference in the below code snippet, where
lambdaParameters.peek()
is being checked for null before it is dereferenced. This seems to be a false positive, as the code should not cause a null dereference.Code:
Output:
Expectations:
This issue appears to be a false positive because
lambdaParameters.peek()
is explicitly checked for nullity before any dereferencing occurs. The error persists even though the code logic should prevent a null dereference.Build tool: maven
checker version: 3.46.0
The text was updated successfully, but these errors were encountered: