We expect try-resources only with variable declarations. In the CFG analysis, we link try statement with the statements in the resources clause if any. Since, actually, (identifiers) and other expressions are supported as try-resources, the CFG analysis fails when it finds an Expression that is not a statement. The solution will be ignoring those resources for the CFG if they are not statements.