# HG changeset patch # User minqi # Date 1415908853 0 # Node ID 86c674274c948b71ebb5c4da9e736e78b479bd33 # Parent ab72a2f48aef4cffbebae01ed450073d8dd95e8e# Parent 643d6baecfe1c2b1ca5d1aef9177e8a36e1dc597 Merge diff -r ab72a2f48aef -r 86c674274c94 test/testlibrary/whitebox/sun/hotspot/WhiteBox.java --- a/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java Wed Nov 05 16:28:11 2014 +0100 +++ b/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java Thu Nov 13 20:00:53 2014 +0000 @@ -208,4 +208,13 @@ .findAny() .orElse(null); } + public native int getOffsetForName0(String name); + public int getOffsetForName(String name) throws Exception { + int offset = getOffsetForName0(name); + if (offset == -1) { + throw new RuntimeException(name + " not found"); + } + return offset; + } + }