Skip to content

Commit 6ecf551

Browse files
author
emmanue1
committed
Optimize ternary operator
1 parent 4ae2ddc commit 6ecf551

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main/java/org/jd/core/v1/service/fragmenter/javasyntaxtojavafragment/visitor/ExpressionVisitor.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -571,9 +571,7 @@ public void visit(TernaryOperatorExpression expression) {
571571

572572
if (be1.isFalse() && be2.isTrue()) {
573573
tokens.add(TextToken.EXCLAMATION);
574-
tokens.add(TextToken.LEFTROUNDBRACKET);
575-
expression.getCondition().accept(this);
576-
tokens.add(TextToken.RIGHTROUNDBRACKET);
574+
printTernaryOperatorExpression(expression.getCondition());
577575
return;
578576
}
579577
}

0 commit comments

Comments
 (0)