Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bb6e044

Browse files
committed
Boxed variable query: account for implicit-init variables
1 parent 0e3f6f7 commit bb6e044

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

java/ql/src/Violations of Best Practice/Boxed Types/BoxedVariable.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ from LocalBoxedVar v
6363
where
6464
forall(Expr e | e = v.getAnAssignedValue() | e.getType() = v.getPrimitiveType()) and
6565
(
66-
not v.getDeclExpr().getParent() instanceof EnhancedForStmt or
66+
not v.getDeclExpr().hasImplicitInit() or
6767
v.getDeclExpr().getParent().(EnhancedForStmt).getExpr().getType().(Array).getComponentType() =
6868
v.getPrimitiveType()
6969
) and

0 commit comments

Comments
 (0)