Skip to content

Commit

Permalink
use non-deprecated CaseTree#getExpressions()
Browse files Browse the repository at this point in the history
  • Loading branch information
PranavPurwar committed May 10, 2022
1 parent fa1181b commit 0397300
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1878,13 +1878,13 @@ public Void visitCase(CaseTree node, Void unused) {
sync(node);
markForPartialFormat();
builder.forcedBreak();
if (node.getExpression() == null) {
if (node.getExpressions().isEmpty()) {
token("default", plusTwo);
token(":");
} else {
token("case", plusTwo);
builder.space();
scan(node.getExpression(), null);
scan(node.getExpressions().get(0), null);
token(":");
}
builder.open(plusTwo);
Expand Down

0 comments on commit 0397300

Please sign in to comment.