Skip to content
Permalink
Browse files

Merge pull request #67 from jglick/structConstructor

[JENKINS-34741] Reproduced problem in test
  • Loading branch information...
jglick committed May 11, 2016
2 parents 32d766a + fc8324a commit ac5d5bf06fb15122437d43d69f5199266897ab64
@@ -329,6 +329,12 @@ public String rawProp5() {
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 ac5d5bf

Please sign in to comment.
You can’t perform that action at this time.