-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
6
-
generic
-
generic
WhileLoopTree.getCondition(), DoWhileLoop.getCondition() and SynchronizedTree.getExpression() always returns a ParenthesedTree, not the expression itself. For example, "while(true);" defines a WhileLoopTree whose condition is a ParenthesizedTree, and that tree's expression is the LiteralTree. Previously (I don't know what release this changed) WhileLoopTree.getCondition() returned the LiteralTree. I think the ParenthesizedTree is a mistake because the outer parentheses in while, do/while, and synchronized statements are part of their syntax. ForLoopTree does not return a ParenthesizedTree for its methods (unless the original code had parens, of course).
This is an issue for source code rewriters which want to preserve the original parentheses when changing the expression within.
This is an issue for source code rewriters which want to preserve the original parentheses when changing the expression within.