mirror of
https://github.com/corda/corda.git
synced 2025-01-03 19:54:13 +00:00
20f4510122
My previous attempt at this was incomplete; it did not address Java->native->Java->native call sequences, nor did it address continuations. This commit takes care of both.
25 lines
468 B
Java
25 lines
468 B
Java
public class Initializers {
|
|
private static class Static2 {
|
|
public static String foo = "Static2.foo";
|
|
|
|
static {
|
|
System.gc();
|
|
new Exception().printStackTrace();
|
|
}
|
|
}
|
|
|
|
private static class Static1 {
|
|
public static String foo = "Static1.foo";
|
|
|
|
static {
|
|
System.out.println(Static2.foo);
|
|
}
|
|
}
|
|
|
|
public static void main(String[] args) {
|
|
Object x = new Object();
|
|
System.out.println(Static1.foo);
|
|
x.toString();
|
|
}
|
|
}
|