changeset 7386:86c674274c94

Merge
author minqi
date Thu, 13 Nov 2014 20:00:53 +0000
parents ab72a2f48aef (current diff) 643d6baecfe1 (diff)
children 3a8a0fd171c5
files
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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;
+  }
+
 }