--- a/hotspot/src/share/vm/oops/methodOop.cpp Fri Jul 16 08:29:42 2010 -0700
+++ b/hotspot/src/share/vm/oops/methodOop.cpp Fri Jul 16 18:14:19 2010 -0700
@@ -851,9 +851,15 @@
// MethodHandleCompiler.
// Must be consistent with MethodHandleCompiler::get_method_oop().
bool methodOopDesc::is_method_handle_adapter() const {
- return (is_method_handle_invoke_name(name()) &&
- is_synthetic() &&
- MethodHandleCompiler::klass_is_method_handle_adapter_holder(method_holder()));
+ if (is_synthetic() &&
+ !is_native() && // has code from MethodHandleCompiler
+ is_method_handle_invoke_name(name()) &&
+ MethodHandleCompiler::klass_is_method_handle_adapter_holder(method_holder())) {
+ assert(!is_method_handle_invoke(), "disjoint");
+ return true;
+ } else {
+ return false;
+ }
}
methodHandle methodOopDesc::make_invoke_method(KlassHandle holder,