# HG changeset patch # User jrose # Date 1385504167 18000 # Node ID f21f49c7c26514c73ba02ebf9d76b381655fe5d0 # Parent 830aedb5accd1d8e639dbea11eaaecd887b877ea 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 diff -r 830aedb5accd -r f21f49c7c265 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(); + } + }