Skip to content

Commit

Permalink
Also guard the other constructor, and make the exprs prop immutable
Browse files Browse the repository at this point in the history
  • Loading branch information
niloc132 committed Oct 16, 2024
1 parent c0729be commit 9c0955f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dev/core/src/com/google/gwt/dev/jjs/ast/JCaseStatement.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ public JCaseStatement(SourceInfo info, JExpression expr) {

public JCaseStatement(SourceInfo info, Collection<JExpression> exprs) {
super(info);
this.exprs = Collections.unmodifiableList(new ArrayList<>(exprs));
this.exprs = Lists.newArrayList(exprs);
}

public boolean isDefault() {
return exprs.isEmpty();
}

public List<JExpression> getExprs() {
return exprs;
return Collections.unmodifiableList(exprs);
}

public JBinaryOperation convertToCompareExpression(JExpression value) {
Expand Down

0 comments on commit 9c0955f

Please sign in to comment.