Skip to content

Commit

Permalink
[JENKINS-25118] Enhanced test to make sure the call can be whiteliste…
Browse files Browse the repository at this point in the history
…d, too.
  • Loading branch information
jglick committed Oct 13, 2014
1 parent ba5b9ac commit 0240639
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -334,10 +334,11 @@ private Unsafe() {}
@Bug(25118)
@Test public void primitiveTypes() throws Exception {
try {
assertEvaluate(new ProxyWhitelist(), "2", "'123'.charAt(1);");
assertEvaluate(new ProxyWhitelist(), "should fail", "'123'.charAt(1);");
} catch (RejectedAccessException x) {
assertNotNull(x.toString(), x.getSignature());
}
assertEvaluate(new StaticWhitelist("method java.lang.CharSequence charAt int"), '2', "'123'.charAt(1);");
}

private static void assertEvaluate(Whitelist whitelist, final Object expected, final String script) {
Expand Down

0 comments on commit 0240639

Please sign in to comment.