From f1dc9b94276424e140d42553ace5f090d6a269ed Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Fri, 27 Dec 2024 11:25:38 +0100 Subject: [PATCH] Revert "Try alternative way of determining parenthesis level for `BinaryExpression` when AST doesn't provide `_INSIDE_PARENTHESES_LEVEL` flag (#4807)" This reverts commit e59e48b3a6e6be18ecb779ac329a243ed025da58. --- .../main/java/org/openrewrite/groovy/GroovyParserVisitor.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/rewrite-groovy/src/main/java/org/openrewrite/groovy/GroovyParserVisitor.java b/rewrite-groovy/src/main/java/org/openrewrite/groovy/GroovyParserVisitor.java index af660485f32..70ff3937d6d 100644 --- a/rewrite-groovy/src/main/java/org/openrewrite/groovy/GroovyParserVisitor.java +++ b/rewrite-groovy/src/main/java/org/openrewrite/groovy/GroovyParserVisitor.java @@ -2540,10 +2540,6 @@ private int sourceLengthOfString(ConstantExpression expr) { } else if (node instanceof MethodCallExpression) { MethodCallExpression expr = (MethodCallExpression) node; return determineParenthesisLevel(expr.getObjectExpression().getLineNumber(), expr.getLineNumber(), expr.getObjectExpression().getColumnNumber(), expr.getColumnNumber()); - } else if (node instanceof BinaryExpression) { - BinaryExpression expr = (BinaryExpression) node; - return determineParenthesisLevel(expr.getLeftExpression().getLineNumber(), expr.getLineNumber(), expr.getLeftExpression().getColumnNumber(), expr.getColumnNumber()); - } return null; }