diff -r d30b4459b71b -r 34872a21af82 src/hotspot/share/oops/constantPool.cpp --- a/src/hotspot/share/oops/constantPool.cpp Thu Jun 28 10:51:02 2018 -0700 +++ b/src/hotspot/share/oops/constantPool.cpp Mon Jul 02 10:09:01 2018 -0700 @@ -807,6 +807,17 @@ } } +constantTag ConstantPool::constant_tag_at(int which) { + constantTag tag = tag_at(which); + if (tag.is_dynamic_constant() || + tag.is_dynamic_constant_in_error()) { + // have to look at the signature for this one + Symbol* constant_type = uncached_signature_ref_at(which); + return constantTag::ofBasicType(FieldType::basic_type(constant_type)); + } + return tag; +} + BasicType ConstantPool::basic_type_for_constant_at(int which) { constantTag tag = tag_at(which); if (tag.is_dynamic_constant() ||