--- old/src/share/vm/interpreter/linkResolver.cpp 2015-10-08 07:24:08.000000000 -1000 +++ new/src/share/vm/interpreter/linkResolver.cpp 2015-10-08 07:24:08.000000000 -1000 @@ -124,7 +124,7 @@ // Note: with several active threads, the must_be_compiled may be true // while can_be_compiled is false; remove assert // assert(CompilationPolicy::can_be_compiled(selected_method), "cannot compile"); - if (THREAD->is_Compiler_thread()) { + if (!THREAD->can_call_java()) { // don't force compilation, resolve was on behalf of compiler return; } @@ -450,7 +450,7 @@ } return result; } else if (iid == vmIntrinsics::_invokeGeneric - && !THREAD->is_Compiler_thread() + && THREAD->can_call_java() && appendix_result_or_null != NULL) { // This is a method with type-checking semantics. // We will ask Java code to spin an adapter method for it.