diff --git a/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java b/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java index 010903a8548..1b812cc464b 100644 --- a/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java +++ b/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java @@ -1451,7 +1451,12 @@ private IfStatement convertIfStatement(JCIf javac) { IfStatement res = this.ast.newIfStatement(); commonSettings(res, javac); if (javac.getCondition() != null) { - res.setExpression(convertExpression(javac.getCondition())); + JCExpression expr = javac.getCondition(); + if( expr instanceof JCParens jpc) { + res.setExpression(convertExpression(jpc.getExpression())); + } else { + res.setExpression(convertExpression(expr)); + } } if (javac.getThenStatement() != null) { res.setThenStatement(convertStatement(javac.getThenStatement(), res));