eclipse-jdt / eclipse.jdt.ui

Eclipse Public License 2.0
32 stars 79 forks source link

Conflicting javadoc for TryStatement.resources() vs ASTConverter9Test.testBug497719_0002 #1455

Open mickaelistria opened 1 month ago

mickaelistria commented 1 month ago

Javadoc on TryStatement.resources() says "A resource is either a VariableDeclarationExpression or (since JLS9) a Name". ASTConverter9Test.testBug497719_0002 tries to cast an item of the resources() list into a SuperFieldAccess and passes.

This is inconsistent; maybe the javadoc should be change to clarify "In a well-formed Java code, a resource is either a VariableDeclarationExpression or (since JLS9) a Name."