-
Notifications
You must be signed in to change notification settings - Fork 30
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
Tidy up X509CRLImpl #864
Tidy up X509CRLImpl #864
Conversation
ckelleyRH
commented
Jun 10, 2022
- Reorder modifiers to match the JLS
- Rename static constant to match JLS
- Remove commented out code
- Use pattern matching with instanceof
- Remove unnecessary else clauses
- Use ternary operator where appropriate
- Put array designator on the type not the variable
- Remove unnecessary negation in logic of parse() method
* Reorder modifiers to match the JLS * Rename static constant to match JLS * Remove commented out code * Use pattern matching with instanceof * Remove unnecessary else clauses * Use ternary operator where appropriate * Put array designator on the type not the variable * Remove unnecessary negation in logic of parse() method
This exploded nicely because the build is against Java 11 and the pattern matching |
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.
LGTM.
BTW, CMake seems to build with java 17 sources but maven build with java 11. They should use the same version
Yeah I thought I had updated this when we moved on to OpenJDK 17 but clearly not, I must be thinking of another repo or mis-remembering. |
Simply updating the
This still causes a failure with the tests:
Here it looks like a test file has already been compiled with Java 17 but the runner is still trying to use Java 11 somehow. |
I don't expect the current revision to work, but wanted to push in case either of you have spotted that I have missed a Java 11 declaration somewhere! |
Now it works locally but doesn't work in the CI for some reason. Will look again tomorrow. |
.github/workflows/maven-tests.yml
Outdated
distribution: 'adopt' | ||
|
||
- name: Set JAVA_HOME | ||
run: export JAVA_HOME=/usr/lib/jvm/jre-17-openjdk |
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.
I tried installing openjdk-17-jdk
on a Debian container, the files got installed under /usr/lib/jvm/java-17-openjdk-amd64
so maybe try that instead.
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.
Can we actually set an environment variable this way in GH workflow? Or do we need to use env:
?
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 SonarCloud now is working but the env with the correct jvm should go in all tests with ubuntu/debian.
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.
Ah yes, I will use env
, forgot about that.
Kudos, SonarCloud Quality Gate passed! |
OK, now everything fails the "proper" way. Interestingly, The Debian/Ubuntu Azure pipelines were previously successful. They were not affected by #861. Perhaps it is a consequence of Java 17, the issue we are seeing? |
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.
It's reported on Debian too:
https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1855971.html
Regardless, the PR looks good. Thanks for the update!