< prev index next >

src/hotspot/share/prims/jniCheck.cpp

Print this page

        

@@ -271,11 +271,12 @@
 
   /* check for proper field type */
   if (!id->find_local_field(&fd))
     ReportJNIFatalError(thr, fatal_static_field_not_found);
   if ((fd.field_type() != ftype) &&
-      !(fd.field_type() == T_ARRAY && ftype == T_OBJECT)) {
+      !(fd.field_type() == T_ARRAY && ftype == T_OBJECT) &&
+      !(fd.field_type() == T_VALUETYPE && ftype == T_OBJECT)) {
     ReportJNIFatalError(thr, fatal_static_field_mismatch);
   }
 }
 
 static inline void

@@ -308,11 +309,12 @@
   if (!InstanceKlass::cast(k_oop)->find_field_from_offset(offset,
                                                               false, &fd))
     ReportJNIFatalError(thr, fatal_instance_field_not_found);
 
   if ((fd.field_type() != ftype) &&
-      !(fd.field_type() == T_ARRAY && ftype == T_OBJECT)) {
+      !(fd.field_type() == T_ARRAY && ftype == T_OBJECT) &&
+      !(fd.field_type() == T_VALUETYPE && ftype == T_OBJECT)) {
     ReportJNIFatalError(thr, fatal_instance_field_mismatch);
   }
 }
 
 static inline void
< prev index next >