hotspot/src/share/vm/shark/sharkConstant.cpp
changeset 15207 86fd7c602ddf
parent 14622 8e94e4186d35
child 22234 da823d78ad65
--- a/hotspot/src/share/vm/shark/sharkConstant.cpp	Fri Jan 11 16:47:23 2013 -0800
+++ b/hotspot/src/share/vm/shark/sharkConstant.cpp	Fri Jan 11 16:47:23 2013 -0800
@@ -37,7 +37,12 @@
   ciType *type = NULL;
   if (constant.basic_type() == T_OBJECT) {
     ciEnv *env = ciEnv::current();
-    assert(constant.as_object()->klass() == env->String_klass() || constant.as_object()->klass() == env->Class_klass(), "should be");
+
+    assert(constant.as_object()->klass() == env->String_klass()
+           || constant.as_object()->klass() == env->Class_klass()
+           || constant.as_object()->klass()->is_subtype_of(env->MethodType_klass())
+           || constant.as_object()->klass()->is_subtype_of(env->MethodHandle_klass()), "should be");
+
     type = constant.as_object()->klass();
   }
   return new SharkConstant(constant, type);