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 #1440

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Java 17 #1440

wants to merge 9 commits into from

Conversation

@Alextopher Alextopher requested a review from a team as a code owner September 29, 2024 11:14
@spacey-sooty
Copy link
Member

This should update code to use new Java 17 features

@Alextopher
Copy link
Contributor Author

This should update code to use new Java 17 features

I can do that. I'm familiar with instanceof pattern matching and new switch syntax. Are there other things I should look out for?

@spacey-sooty
Copy link
Member

spacey-sooty commented Sep 29, 2024

Potentially enhanced instanceof to simplify equals methods.
wpilibsuite/allwpilib#6691 could be of help

@spacey-sooty
Copy link
Member

Superesedes #1069

Copy link
Member

@spacey-sooty spacey-sooty left a comment

Choose a reason for hiding this comment

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

FWIW looks good to me

@spacey-sooty
Copy link
Member

sourceCompatibility = JavaVersion.VERSION_11

Maybe this hack can be removed from build scripts?

This isn't a hack? it should be set to 17 tho

@Alextopher
Copy link
Contributor Author

@spacey-sooty You're just too fast! I copy pasted the wrong permalink.

https://github.com/Alextopher/photonvision/blob/f4e2d4b3bef7a707fd156c8b7cd68f7ce251cd75/photon-docs/build.gradle#L250

This looks like a hack - does JDK 17 just fix this? RE @mcm001 #1094

@spacey-sooty
Copy link
Member

@spacey-sooty You're just too fast! I copy pasted the wrong permalink.

Alextopher/photonvision@f4e2d4b/photon-docs/build.gradle#L250

This looks like a hack - does JDK 17 just fix this? RE @mcm001 #1094

Based off when it was resolved I don't think so?

@srimanachanta
Copy link
Member

You can also steal stuff from #1069. I can rerun Intellij inspection after and do more stuff. It does it all automatically so no need for you to manually implement all the basic stuff yourself (switch cases, instance typing, etc).

@srimanachanta
Copy link
Member

Supersedes #1069

Signed-off-by: Jade Turner <[email protected]>
Signed-off-by: Jade Turner <[email protected]>
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.

4 participants