src/hotspot/share/prims/jvm.cpp
changeset 47674 1587ffa1496a
parent 47658 c2b7fb8e5144
child 47765 b7c7428eaab9
equal deleted inserted replaced
47673:6126617b8508 47674:1587ffa1496a
  3353 JVM_END
  3353 JVM_END
  3354 
  3354 
  3355 
  3355 
  3356 // ObjectInputStream ///////////////////////////////////////////////////////////////
  3356 // ObjectInputStream ///////////////////////////////////////////////////////////////
  3357 
  3357 
  3358 bool force_verify_field_access(Klass* current_class, Klass* field_class, AccessFlags access, bool classloader_only) {
       
  3359   if (current_class == NULL) {
       
  3360     return true;
       
  3361   }
       
  3362   if ((current_class == field_class) || access.is_public()) {
       
  3363     return true;
       
  3364   }
       
  3365 
       
  3366   if (access.is_protected()) {
       
  3367     // See if current_class is a subclass of field_class
       
  3368     if (current_class->is_subclass_of(field_class)) {
       
  3369       return true;
       
  3370     }
       
  3371   }
       
  3372 
       
  3373   return (!access.is_private() && InstanceKlass::cast(current_class)->is_same_class_package(field_class));
       
  3374 }
       
  3375 
       
  3376 // Return the first user-defined class loader up the execution stack, or null
  3358 // Return the first user-defined class loader up the execution stack, or null
  3377 // if only code from the bootstrap or platform class loader is on the stack.
  3359 // if only code from the bootstrap or platform class loader is on the stack.
  3378 
  3360 
  3379 JVM_ENTRY(jobject, JVM_LatestUserDefinedLoader(JNIEnv *env))
  3361 JVM_ENTRY(jobject, JVM_LatestUserDefinedLoader(JNIEnv *env))
  3380   for (vframeStream vfst(thread); !vfst.at_end(); vfst.next()) {
  3362   for (vframeStream vfst(thread); !vfst.at_end(); vfst.next()) {