--- a/src/hotspot/share/memory/heapShared.cpp Mon Sep 23 14:39:11 2019 -0400
+++ b/src/hotspot/share/memory/heapShared.cpp Mon Sep 23 14:49:04 2019 -0400
@@ -583,7 +583,7 @@
for (JavaFieldStream fs(k); !fs.done(); fs.next()) {
if (!fs.access_flags().is_static()) {
BasicType ft = fs.field_descriptor().field_type();
- if (!fs.access_flags().is_final() && (ft == T_ARRAY || ft == T_OBJECT)) {
+ if (!fs.access_flags().is_final() && is_reference_type(ft)) {
ResourceMark rm(THREAD);
log_warning(cds, heap)(
"Please check reference field in %s instance in closed archive heap region: %s %s",
@@ -871,7 +871,7 @@
virtual void do_field(fieldDescriptor* fd) {
if (fd->name() == _field_name) {
assert(!_found, "fields cannot be overloaded");
- assert(fd->field_type() == T_OBJECT || fd->field_type() == T_ARRAY, "can archive only obj or array fields");
+ assert(is_reference_type(fd->field_type()), "can archive only fields that are references");
_found = true;
_offset = fd->offset();
}