Community
Participate
Working Groups
BETA_JAVA7 Problems in TryStatementWithResources: - wrong @since 3.0 tags - order of properties in PROPERTY_DESCRIPTORS should be declaration order. In the static initializer, the line addProperty(RESOURCES_PROPERTY, propertyList); should be moved to before addProperty(BODY_PROPERTY, propertyList); - for consistency, also the fields would better be ordered the same way (move "ASTNode.NodeList resources" up), and treeSize() should also be ordered - constructor Javadoc should say "... the try statement has no resources, ..." - in AST#newTryStatementWithResources(), "no resources" should also be moved to front - clone0(*) and internalGetChildListProperty(*) are missing "resources" - memSize() should contain 4 * 4 (one field added) Problems in DisjunctiveType: - wrong @since 3.0 tags - type Javadoc - is missing grammar - typo: "inside as catch formal parameter type": as -> a - compare DisjunctiveType.java with e.g. ParameterizedType.java and remove all unnecessary inconsistencies (e.g. ordering)
The problems in TryStatementWithResources should be resolved when that node type gets integrated into TryStatement (see bug 340375).
The grammar of TryStatementWithResources is also wrong: It contains "[ CatchClause ]", but that should be "{ CatchClause }".
(In reply to comment #2) > The grammar of TryStatementWithResources is also wrong: > It contains "[ CatchClause ]", but that should be "{ CatchClause }". [..] means optional. So [ CatchClause ] is right for the TWR statement. You don't need to have catch clauses. I'll fix the remaining issues by merging with the TryStatement.
Released for 3.7M7 in BETA_JAVA7 branch.
Created attachment 191520 [details] More fixes Here's a bunch of additional fixes for the new APIs. The changes in ASTNode are to ensure that nothing needs to be touched again when JLS5 is added. The changes in ClassInstanceCreation and QualifiedType are just typos that should also be corrected in HEAD.
.
Released. Thx for the patch.
Created attachment 191525 [details] Proposed fix Extracted the part that needs to be released in HEAD.
Released in HEAD.
Verified.