mirror of
https://github.com/corda/corda.git
synced 2025-06-18 15:18:16 +00:00
add jdk-test target, and fix failures
The intent of this target is to run our test suite against the installed jre. This should help prevent our VM from diverging in implementation from the jdk. The remainder of this commit fixes the problems that this exposes.
This commit is contained in:
@ -11,10 +11,23 @@
|
||||
package avian;
|
||||
|
||||
import sun.misc.Unsafe;
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
public abstract class Machine {
|
||||
|
||||
private static final Unsafe unsafe = Unsafe.getUnsafe();
|
||||
private static final Unsafe unsafe;
|
||||
|
||||
static {
|
||||
Unsafe u;
|
||||
try {
|
||||
Field f = Unsafe.class.getDeclaredField("theUnsafe");
|
||||
f.setAccessible(true);
|
||||
u = (Unsafe)f.get(null);
|
||||
} catch (Exception e) {
|
||||
u = null;
|
||||
}
|
||||
unsafe = u;
|
||||
}
|
||||
|
||||
public static native void dumpHeap(String outputFile);
|
||||
|
||||
|
Reference in New Issue
Block a user