hotspot/src/share/vm/oops/cpCache.cpp
changeset 35913 928548a43408
parent 35543 0961315f4016
parent 35900 d64cf9290fc4
child 38031 e0b822facc03
child 37248 11a660dbbb8e
--- a/hotspot/src/share/vm/oops/cpCache.cpp	Thu Jan 28 16:30:37 2016 -0800
+++ b/hotspot/src/share/vm/oops/cpCache.cpp	Wed Feb 03 01:35:25 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -396,9 +396,7 @@
         int holder_index = cpool->uncached_klass_ref_index_at(constant_pool_index());
         if (cpool->tag_at(holder_index).is_klass()) {
           Klass* klass = cpool->resolved_klass_at(holder_index);
-          if (!klass->is_instance_klass())
-            klass = SystemDictionary::Object_klass();
-          return InstanceKlass::cast(klass)->method_at_vtable(f2_as_index());
+          return klass->method_at_vtable(f2_as_index());
         }
       }
       break;