--- a/src/hotspot/share/oops/constantPool.cpp Tue Jan 29 16:12:12 2019 +0000
+++ b/src/hotspot/share/oops/constantPool.cpp Tue Jan 29 11:56:51 2019 -0500
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, 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
@@ -817,9 +817,9 @@
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));
+ BasicType bt = basic_type_for_constant_at(which);
+ // dynamic constant could return an array, treat as object
+ return constantTag::ofBasicType(is_reference_type(bt) ? T_OBJECT : bt);
}
return tag;
}