From 9c0955f22ea2896f4e8da8429f7a04d20aafaf43 Mon Sep 17 00:00:00 2001 From: Colin Alworth Date: Wed, 16 Oct 2024 15:11:57 -0500 Subject: [PATCH] Also guard the other constructor, and make the exprs prop immutable --- dev/core/src/com/google/gwt/dev/jjs/ast/JCaseStatement.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/core/src/com/google/gwt/dev/jjs/ast/JCaseStatement.java b/dev/core/src/com/google/gwt/dev/jjs/ast/JCaseStatement.java index 8b7e96034a..2fc4b0d6c5 100644 --- a/dev/core/src/com/google/gwt/dev/jjs/ast/JCaseStatement.java +++ b/dev/core/src/com/google/gwt/dev/jjs/ast/JCaseStatement.java @@ -37,7 +37,7 @@ public JCaseStatement(SourceInfo info, JExpression expr) { public JCaseStatement(SourceInfo info, Collection exprs) { super(info); - this.exprs = Collections.unmodifiableList(new ArrayList<>(exprs)); + this.exprs = Lists.newArrayList(exprs); } public boolean isDefault() { @@ -45,7 +45,7 @@ public boolean isDefault() { } public List getExprs() { - return exprs; + return Collections.unmodifiableList(exprs); } public JBinaryOperation convertToCompareExpression(JExpression value) {