426 superk = handle_resolution_exception(class_name, true, superk, THREAD); 427 } 428 429 return superk; 430 } 431 432 void SystemDictionary::validate_protection_domain(InstanceKlass* klass, 433 Handle class_loader, 434 Handle protection_domain, 435 TRAPS) { 436 if(!has_checkPackageAccess()) return; 437 438 // Now we have to call back to java to check if the initating class has access 439 JavaValue result(T_VOID); 440 LogTarget(Debug, protectiondomain) lt; 441 if (lt.is_enabled()) { 442 ResourceMark rm; 443 // Print out trace information 444 LogStream ls(lt); 445 ls.print_cr("Checking package access"); 446 ls.print("class loader: "); class_loader()->print_value_on(&ls); 447 ls.print(" protection domain: "); protection_domain()->print_value_on(&ls); 448 ls.print(" loading: "); klass->print_value_on(&ls); 449 ls.cr(); 450 } 451 452 // This handle and the class_loader handle passed in keeps this class from 453 // being unloaded through several GC points. 454 // The class_loader handle passed in is the initiating loader. 455 Handle mirror(THREAD, klass->java_mirror()); 456 457 InstanceKlass* system_loader = SystemDictionary::ClassLoader_klass(); 458 JavaCalls::call_special(&result, 459 class_loader, 460 system_loader, 461 vmSymbols::checkPackageAccess_name(), 462 vmSymbols::class_protectiondomain_signature(), 463 mirror, 464 protection_domain, 465 THREAD); 466 467 if (HAS_PENDING_EXCEPTION) { | 426 superk = handle_resolution_exception(class_name, true, superk, THREAD); 427 } 428 429 return superk; 430 } 431 432 void SystemDictionary::validate_protection_domain(InstanceKlass* klass, 433 Handle class_loader, 434 Handle protection_domain, 435 TRAPS) { 436 if(!has_checkPackageAccess()) return; 437 438 // Now we have to call back to java to check if the initating class has access 439 JavaValue result(T_VOID); 440 LogTarget(Debug, protectiondomain) lt; 441 if (lt.is_enabled()) { 442 ResourceMark rm; 443 // Print out trace information 444 LogStream ls(lt); 445 ls.print_cr("Checking package access"); 446 ls.print("class loader: "); oopDesc::print_value_on(&ls, class_loader()); 447 ls.print(" protection domain: "); oopDesc::print_value_on(&ls, protection_domain()); 448 ls.print(" loading: "); klass->print_value_on(&ls); 449 ls.cr(); 450 } 451 452 // This handle and the class_loader handle passed in keeps this class from 453 // being unloaded through several GC points. 454 // The class_loader handle passed in is the initiating loader. 455 Handle mirror(THREAD, klass->java_mirror()); 456 457 InstanceKlass* system_loader = SystemDictionary::ClassLoader_klass(); 458 JavaCalls::call_special(&result, 459 class_loader, 460 system_loader, 461 vmSymbols::checkPackageAccess_name(), 462 vmSymbols::class_protectiondomain_signature(), 463 mirror, 464 protection_domain, 465 THREAD); 466 467 if (HAS_PENDING_EXCEPTION) { |