Skip to content

Commit

Permalink
[JENKINS-71808] GenericWhitelistTest#sanity fails on Java 21
Browse files Browse the repository at this point in the history
  • Loading branch information
basil committed Aug 11, 2023
1 parent ecf6602 commit 18598d6
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 18598d6

Please sign in to comment.