Skip to content

Commit

Permalink
Rename.
Browse files Browse the repository at this point in the history
  • Loading branch information
smillst committed Sep 27, 2023
1 parent 5365302 commit 0138c87
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,17 @@ public static List<? extends Tree> getLabels(CaseTree caseTree) {
@SuppressWarnings("unchecked")
List<? extends Tree> caseLabelTrees =
(List<? extends Tree>) invokeNonNullResult(GET_LABELS, caseTree);
List<Tree> unWrappedLabels = new ArrayList<>();
List<Tree> labels = new ArrayList<>();
for (Tree caseLabel : caseLabelTrees) {
if (TreeUtils.isDefaultCaseLabelTree(caseLabel)) {
return Collections.emptyList();
} else if (TreeUtils.isConstantCaseLabelTree(caseLabel)) {
unWrappedLabels.add(ConstantCaseLabelUtils.getConstantExpression(caseLabel));
labels.add(ConstantCaseLabelUtils.getConstantExpression(caseLabel));
} else if (TreeUtils.isPatternCaseLabelTree(caseLabel)) {
unWrappedLabels.add(PatternCaseLabelUtils.getPattern(caseLabel));
labels.add(PatternCaseLabelUtils.getPattern(caseLabel));
}
}
return unWrappedLabels;
return labels;
}
return getExpressions(caseTree);
}
Expand Down

0 comments on commit 0138c87

Please sign in to comment.