Skip to content

Commit

Permalink
Merge pull request #519 from basil/JENKINS-71808
Browse files Browse the repository at this point in the history
[JENKINS-71808] `GenericWhitelistTest#sanity` fails on Java 21
  • Loading branch information
jglick authored Aug 16, 2023
2 parents 2dc1ea0 + 18598d6 commit 639888f
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import java.util.List;
import java.util.Random;
import java.util.Set;
import java.util.regex.Matcher;

import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.EnumeratingWhitelist.MethodSignature;
import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.EnumeratingWhitelist.Signature;
Expand Down Expand Up @@ -140,7 +141,11 @@ static void sanity(URL definition) throws Exception {
new MethodSignature("java.util.random.RandomGenerator", "nextGaussian"),
new MethodSignature("java.util.random.RandomGenerator", "nextInt"),
new MethodSignature("java.util.random.RandomGenerator", "nextInt", "int"),
new MethodSignature("java.util.random.RandomGenerator", "nextLong")
new MethodSignature("java.util.random.RandomGenerator", "nextLong"),
// Override the corresponding MatchResult methods in Java 20+.
new MethodSignature(Matcher.class, "end", String.class),
new MethodSignature(Matcher.class, "group", String.class),
new MethodSignature(Matcher.class, "start", String.class)
));

@Test public void sanity() throws Exception {
Expand Down

0 comments on commit 639888f

Please sign in to comment.