8016839: JSR292: AME instead of IAE when calling a method
authorjrose
Tue, 26 Nov 2013 17:16:07 -0500
changeset 21851 f21f49c7c265
parent 21850 830aedb5accd
child 21852 5059284b03a0
8016839: JSR292: AME instead of IAE when calling a method Summary: Catch missing-because-illegal case for itable entries and use an exception-throwing method instead of null. Reviewed-by: acorn, jrose, coleenp Contributed-by: david.r.chase@oracle.com
jdk/src/share/classes/sun/misc/Unsafe.java
--- a/jdk/src/share/classes/sun/misc/Unsafe.java	Tue Nov 26 14:49:55 2013 +0900
+++ b/jdk/src/share/classes/sun/misc/Unsafe.java	Tue Nov 26 17:16:07 2013 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1131,4 +1131,12 @@
      */
     public native void fullFence();
 
+    /**
+     * Throws IllegalAccessError; for use by the VM.
+     * @since 1.8
+     */
+    private static void throwIllegalAccessError() {
+       throw new IllegalAccessError();
+    }
+
 }