hotspot/src/share/vm/runtime/reflection.cpp
changeset 4581 e89fbd1bcb3d
parent 4571 80b553bddc26
child 5547 f4b087cbb361
--- a/hotspot/src/share/vm/runtime/reflection.cpp	Thu Jan 07 16:26:31 2010 -0800
+++ b/hotspot/src/share/vm/runtime/reflection.cpp	Fri Jan 08 11:09:46 2010 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2009 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2010 Sun Microsystems, Inc.  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
@@ -482,6 +482,11 @@
       under_host_klass(accessee_ik, accessor))
     return true;
 
+  // Adapter frames can access anything.
+  if (MethodHandleCompiler::klass_is_method_handle_adapter_holder(accessor))
+    // This is an internal adapter frame from the MethodHandleCompiler.
+    return true;
+
   if (RelaxAccessControlCheck ||
       (accessor_ik->major_version() < JAVA_1_5_VERSION &&
        accessee_ik->major_version() < JAVA_1_5_VERSION)) {