Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

review: fix: correctly print enum constants in switches pre Java 21 #5636

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

SirYwell
Copy link
Collaborator

Due to the changes in #5610, enum constants in switch cases might have been printed incorrectly.

Comment on lines 64 to +69
private static CtModel createModelFromString(String code) {
return createModelFromString(code, 21);
}
private static CtModel createModelFromString(String code, int complianceLevel) {
Launcher launcher = new Launcher();
launcher.getEnvironment().setComplianceLevel(14);
launcher.getEnvironment().setComplianceLevel(complianceLevel);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More a note to myself that we have this method atleast 10 times already.

@MartinWitt
Copy link
Collaborator

LGTM

@I-Al-Istannen I-Al-Istannen merged commit 78e77e4 into INRIA:java17 Jan 30, 2024
8 of 9 checks passed
@SirYwell SirYwell deleted the fix/enum-printing branch January 30, 2024 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants