diff -r 0dbc821628fc -r d64cf9290fc4 hotspot/src/share/vm/runtime/reflection.cpp --- a/hotspot/src/share/vm/runtime/reflection.cpp Tue Dec 01 10:35:49 2015 +0100 +++ b/hotspot/src/share/vm/runtime/reflection.cpp Tue Jan 19 12:07:32 2016 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2016, Oracle and/or its affiliates. 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 @@ -939,10 +939,7 @@ int index = reflected_method->vtable_index(); method = reflected_method; if (index != Method::nonvirtual_vtable_index) { - // target_klass might be an arrayKlassOop but all vtables start at - // the same place. The cast is to avoid virtual call and assertion. - InstanceKlass* inst = (InstanceKlass*)target_klass(); - method = methodHandle(THREAD, inst->method_at_vtable(index)); + method = methodHandle(THREAD, target_klass->method_at_vtable(index)); } if (!method.is_null()) { // Check for abstract methods as well