-
Notifications
You must be signed in to change notification settings - Fork 79
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
Migrate to Java 17 switch #584
Conversation
Thanks. Please squash the commits into one and avoid merge commits in future contriburtions. |
985aa1c
to
8464f5e
Compare
@vogella Commits squashed |
ECA completed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this.
From a coarse look it looks good, I only have one little more suggestion below.
Have not yet reviewed in detail.
...s/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/UseScanParser.java
Outdated
Show resolved
Hide resolved
LGTM Any more suggestions @HannesWell ? |
I'll review it tomorrow. |
e5791f1
to
716d206
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks good.
But at some places I think the use of switches is not so well suited and if/else/else-if statements are a better fit. But that was already the case before.
Nevertheless I changed those places to use if-statements instead.
In general I think many of the switch-expressions should be pattern-matches, but that will require Java-21 or even later (see #592).
Besides that I added missing default cases that caused warnings.
- changed to Java 17 Switch Expression - replace switch-statements by if/else-statements where suitable Co-authored-by: Hannes Wellmann <[email protected]>
Thank you @preveen-stack. |
Replace legacy switch block with java 17 semantics
ref: https://openjdk.org/jeps/361
PS: This is my first PR in eclipse-pde.