1.1 --- a/src/share/vm/ci/ciMethodHandle.cpp Fri Aug 31 16:39:35 2012 -0700 1.2 +++ b/src/share/vm/ci/ciMethodHandle.cpp Sat Sep 01 13:25:18 2012 -0400 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -36,6 +36,11 @@ 1.11 VM_ENTRY_MARK; 1.12 oop form_oop = java_lang_invoke_MethodHandle::form(get_oop()); 1.13 oop vmentry_oop = java_lang_invoke_LambdaForm::vmentry(form_oop); 1.14 - oop vmtarget_oop = java_lang_invoke_MemberName::vmtarget(vmentry_oop); 1.15 - return CURRENT_ENV->get_object(vmtarget_oop)->as_method(); 1.16 + // FIXME: Share code with ciMemberName::get_vmtarget 1.17 + Metadata* vmtarget = java_lang_invoke_MemberName::vmtarget(vmentry_oop); 1.18 + if (vmtarget->is_method()) 1.19 + return CURRENT_ENV->get_method((Method*) vmtarget); 1.20 + // FIXME: What if the vmtarget is a Klass? 1.21 + assert(false, ""); 1.22 + return NULL; 1.23 }