Skip to content

Commit

Permalink
Polish
Browse files Browse the repository at this point in the history
  • Loading branch information
knutwannheden committed Jan 22, 2025
1 parent 20a925a commit e23827c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions rewrite-java/src/main/java/org/openrewrite/java/tree/J.java
Original file line number Diff line number Diff line change
Expand Up @@ -5130,12 +5130,7 @@ final class SwitchExpression implements J, Expression, TypedTree {
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2025-05-01")
public SwitchExpression(UUID id, Space prefix, Markers markers, ControlParentheses<Expression> selector, Block cases) {
this.id = id;
this.prefix = prefix;
this.markers = markers;
this.selector = selector;
this.cases = cases;
this.type = new JavaVisitor<AtomicReference<@Nullable JavaType>>() {
this(id, prefix, markers, selector, cases, new JavaVisitor<AtomicReference<@Nullable JavaType>>() {
@Override
public J visitBlock(Block block, AtomicReference<@Nullable JavaType> javaType) {
if (!block.getStatements().isEmpty()) {
Expand All @@ -5144,7 +5139,7 @@ public J visitBlock(Block block, AtomicReference<@Nullable JavaType> javaType) {
}
return block;
}
}.reduce(this, new AtomicReference<>()).get();
}.reduce(cases, new AtomicReference<>()).get());
}

@Override
Expand Down

0 comments on commit e23827c

Please sign in to comment.