-
Notifications
You must be signed in to change notification settings - Fork 175
Support Java 25 #633
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
Support Java 25 #633
Conversation
Don't add `String.getChars(int, int, char[], int)` or `AbstractStringBuilder.getChars(int, int, char[], int)` to the generic whitelist when running on Java 25 because those methods are now inherited from `CharSequence.getChars(int, int, char[]. int)` Java 25 adds a new method CharSequence.getChars(int, int, char[], int) that is then used in the String class and the AbstractStringBuilder class. Java 25 CharSequence javadoc: * https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/CharSequence.html Java 21 CharSequence javadoc: * https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/CharSequence.html Switches to only test Java 25 and Java 21 because we've found no issues that were specific to the Java 17 compiler. Testing done: * Confirmed that test fails on Java 25 without this change * Confirmed that tests pass on Java 25 with this change * Confirmed that tests pass on Java 21 with this change * Confirmed that tests pass on Java 17 with this change
|
I would appreciate a review from either @jglick or @dwnusbaum since they are most familiar with this code. |
|
@MarkEWaite unless this case is unique, normally when adapting to these kinds of changes we just add the new signatures to |
Follows the same pattern as pull requests: * jenkinsci#394 * jenkinsci#453 Testing done: * Confirmed that tests pass on Java 21 and Java 25
Thanks! I've done that in 2408872 . Much appreciated! |
|
Looks like |
|
I'm disappearing for two weeks, so won't be able to make the necessary final change before I leave. Others are welcome to make the change or it can wait until I return. |
…arious Java versions
|
Tests should be fixed by e23e24f, or at least I checked that |
src/test/java/org/jenkinsci/plugins/scriptsecurity/sandbox/whitelists/StaticWhitelistTest.java
Outdated
Show resolved
Hide resolved
… in KNOWN_GOOD_SIGNATURES
Support Java 25
Don't add
String.getChars(int, int, char[], int)orAbstractStringBuilder.getChars(int, int, char[], int)to the generic whitelist when running on Java 25 because those methods are now inherited fromCharSequence.getChars(int, int, char[]. int)Java 25 adds a new method
CharSequence.getChars(int, int, char[], int)that is then used in the String class and the AbstractStringBuilder class.Java 25 CharSequence javadoc:
Java 21 CharSequence javadoc:
Switches to only test Java 25 and Java 21 because we've found no issues that were specific to the Java 17 compiler.
Testing done
Submitter checklist