Skip to content
Permalink
Browse files
Merge branch 'master' into JENKINS-34739-varargs
  • Loading branch information
jglick committed May 19, 2016
2 parents 8acc84d + ac5d5bf commit 007541f466fbdd143fe15035564a5304aca98f68
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/test/java/org/jenkinsci/plugins/scriptsecurity/sandbox/groovy/SandboxInterceptorTest.java
@@ -328,6 +328,12 @@ public static final class Special {
assertRejected(new AnnotatedWhitelist(), "staticMethod " + clazz + " explode", "C.m(); class C {static void m() {" + clazz + ".explode();}}");
}

@Ignore("TODO RejectedAccessException: unclassified new C java.util.LinkedHashMap")
@Issue("JENKINS-34741")
@Test public void structConstructor() throws Exception {
assertEvaluate(new StaticWhitelist(), "ok", "class C {String f}; new C(f: 'ok').f");
}

@Test public void defSyntax() throws Exception {
String clazz = Unsafe.class.getName();
Whitelist w = new ProxyWhitelist(new AnnotatedWhitelist(), /* for some reason def syntax triggers this */new StaticWhitelist("method java.util.Collection toArray"));

0 comments on commit 007541f

Please sign in to comment.