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

Try to build with JDK 17-ea #1561

Closed
wants to merge 12 commits into from
Closed

Try to build with JDK 17-ea #1561

wants to merge 12 commits into from

Conversation

KengoTODA
Copy link
Member

@KengoTODA KengoTODA commented Jun 1, 2021

17-ea build 24 now contains support for the Pattern Matching for switch (preview), so I want to confirm how SpotBugs reacts on it.

I just worry that it may reproduce a previous problem at JDK 11 b7, #756 in our issues.
Java 11 changed a way to generate bytecode for try-with-resources and it affects SpotBugs, JaCoCo, and other tools. It's better to confirm the behavior by Early Access build before the GA for the coming LTS.

note: Gradle now uses Groovy 3.0.7, that depends on ObjectWeb ASM 9.0 which doesn't support JDK 17.
I guess we need to bump up the Groovy to 3.0.8 with this change, but not sure how at this moment.
If the build in GitHub Actions failed, I will contact Gradle community to grasp how.

Update: posted to Gradle Community Slack

@KengoTODA KengoTODA self-assigned this Jun 1, 2021
@sonarcloud
Copy link

sonarcloud bot commented Jun 1, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

ThrawnCA
ThrawnCA previously approved these changes Jun 1, 2021
@KengoTODA
Copy link
Member Author

KengoTODA commented Jun 1, 2021

It seems JEP 406 isn't ready in the current 17-ea (build 24):
https://github.com/spotbugs/spotbugs/pull/1561/checks?check_run_id=2723285422#step:8:417

/home/runner/work/spotbugs/spotbugs/spotbugsTestCases/src/java14/PatternMatchingForSwitch.java:19: error: : or -> expected

            case Integer i -> String.format("int %d", i);
                        ^
/home/runner/work/spotbugs/spotbugs/spotbugsTestCases/src/java14/PatternMatchingForSwitch.java:19: error: not a statement
            case Integer i -> String.format("int %d", i);
                         ^

I will wait for the coming EA release.

ThrawnCA
ThrawnCA previously approved these changes Jun 2, 2021
@KengoTODA
Copy link
Member Author

note: I've confirmed that JEP 306: Restore Always-Strict Floating-Point Semantics does not affect SpotBugs detectors. There is no logic related to strictfp, except for IClassConstants.ACC_STRICT. There is no code depending on this IClassConstants.ACC_STRICT.

@KengoTODA
Copy link
Member Author

The build 26 contains enough feature to build switch with pattern match. 🎉

@KengoTODA KengoTODA closed this Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants