private Expression convertWithoutParens ( ExpressionTree condition , TreePath parent ) { Expression result = ( Expression ) convert ( condition , parent ) ; if ( result . getKind ( ) == TreeNode . Kind . PARENTHESIZED_EXPRESSION ) { result = TreeUtil . remove ( ( ( ParenthesizedExpression ) result ) . getExpression ( ) ) ; } return result ; }
javac uses a ParenthesizedExpression for the if do and while statements while JDT doesn t .