changeset 44335:4034fe5a6b6c

8177036: Class.checkMemberAccess throws NPE when calling Class methods via JNI Reviewed-by: mchung, alanb
author redestad
date Mon, 20 Mar 2017 21:40:07 +0100
parents b99239096fed
children 9688370d8b66
files jdk/src/java.base/share/classes/java/lang/Class.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/src/java.base/share/classes/java/lang/Class.java	Mon Mar 20 09:18:42 2017 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/Class.java	Mon Mar 20 21:40:07 2017 +0100
@@ -2771,7 +2771,7 @@
          * In all other cases, it requires RuntimePermission("accessDeclaredMembers")
          * permission.
          */
-        final ClassLoader ccl = caller.getClassLoader0();
+        final ClassLoader ccl = ClassLoader.getClassLoader(caller);
         if (which != Member.PUBLIC) {
             final ClassLoader cl = getClassLoader0();
             if (ccl != cl) {