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

Java 17: Update switch expressions #2376

Closed
iluwatar opened this issue Dec 2, 2022 · 8 comments
Closed

Java 17: Update switch expressions #2376

iluwatar opened this issue Dec 2, 2022 · 8 comments

Comments

@iluwatar
Copy link
Owner

iluwatar commented Dec 2, 2022

Java's switch expression syntax has vastly evolved over the years. It's well described at https://medium.com/@javatechie/the-evolution-of-switch-statement-from-java-7-to-java-17-4b5eee8d29b7

Acceptance criteria

  • Java 17 switch expressions have been applied throughout the repository
@CodePawfect
Copy link

Hello @iluwatar,

I haven't contributed to open source yet. But I want to start now.

I am:

  • Oracle Certified Professional Java SE 11 Developer
  • Oracle Certified Professional Java SE 17 Developer

I could take this Issue and refactor all switch expressions to the new syntax.

@CodePawfect
Copy link

CodePawfect commented Dec 15, 2022

Hello @iluwatar thank you for assigne me to the issue.

when i checkout fresh master branch and run mvn checkstyle:check then multiple errors occure:

image

I already have made all necressary changes to the switch statements and opened an pull request in draft. The Pull Request shows "all checks have failed" because of the checkstyle errors from master.

I would be grateful if you could tell me how I should proceed here.

@iluwatar
Copy link
Owner Author

@AlexMitDemBart that command is not taking into account the checkstyle configuration we have in the pom.xml. Try ./mvnw validate instead.

@CodePawfect
Copy link

CodePawfect commented Dec 17, 2022

@iluwatar

Is this something that i can fix?

image

@stale
Copy link

stale bot commented Feb 17, 2023

This issue has been automatically marked as stale because it has not had recent activity. The issue will be unassigned if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status: stale issues and pull requests that have not had recent interaction label Feb 17, 2023
@akshatarora0013
Copy link
Contributor

Hey @iluwatar can I work on this issue, I am new to open source but I have a good grip in Java

@stale stale bot removed the status: stale issues and pull requests that have not had recent interaction label Mar 20, 2023
@akshatarora0013
Copy link
Contributor

Made the pull request (issue #2376), changed all the switch expressions according to JAVA 17.

@jaswanthg76
Copy link

'm new to open-sourcing and I have no clue about what I should be doing. Can anyone guide me? I have basic knowledge of java
let me know in which way I can help you.

@iluwatar iluwatar closed this as completed Apr 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

4 participants