Skip to content

Commit

Permalink
Merge pull request #67 from jglick/structConstructor
Browse files Browse the repository at this point in the history
[JENKINS-34741] Reproduced problem in test
  • Loading branch information
jglick committed May 11, 2016
2 parents 32d766a + fc8324a commit ac5d5bf
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -329,6 +329,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"));
Expand Down

0 comments on commit ac5d5bf

Please sign in to comment.