comparison src/share/vm/runtime/reflection.cpp @ 6934:4735d2c84362

7200776: Implement default methods in interfaces Summary: Add generic type analysis and default method selection algorithms Reviewed-by: coleenp, acorn
author kamg
date Thu, 11 Oct 2012 12:25:42 -0400
parents d8ce2825b193
children 18fb7da42534
comparison
equal deleted inserted replaced
6921:a1b8cf9cf970 6934:4735d2c84362
470 && UseNewReflection 470 && UseNewReflection
471 && Klass::cast(current_class)->is_subclass_of(SystemDictionary::reflect_MagicAccessorImpl_klass())) { 471 && Klass::cast(current_class)->is_subclass_of(SystemDictionary::reflect_MagicAccessorImpl_klass())) {
472 return true; 472 return true;
473 } 473 }
474 474
475 // Also allow all accesses from
476 // java/lang/invoke/MagicLambdaImpl subclasses to succeed trivially.
477 if (current_class->is_subclass_of(SystemDictionary::lambda_MagicLambdaImpl_klass())) {
478 return true;
479 }
480
475 return can_relax_access_check_for(current_class, new_class, classloader_only); 481 return can_relax_access_check_for(current_class, new_class, classloader_only);
476 } 482 }
477 483
478 static bool under_host_klass(InstanceKlass* ik, Klass* host_klass) { 484 static bool under_host_klass(InstanceKlass* ik, Klass* host_klass) {
479 DEBUG_ONLY(int inf_loop_check = 1000 * 1000 * 1000); 485 DEBUG_ONLY(int inf_loop_check = 1000 * 1000 * 1000);
559 // New (1.4) reflection implementation. Allow all accesses from 565 // New (1.4) reflection implementation. Allow all accesses from
560 // sun/reflect/MagicAccessorImpl subclasses to succeed trivially. 566 // sun/reflect/MagicAccessorImpl subclasses to succeed trivially.
561 if ( JDK_Version::is_gte_jdk14x_version() 567 if ( JDK_Version::is_gte_jdk14x_version()
562 && UseNewReflection 568 && UseNewReflection
563 && Klass::cast(current_class)->is_subclass_of(SystemDictionary::reflect_MagicAccessorImpl_klass())) { 569 && Klass::cast(current_class)->is_subclass_of(SystemDictionary::reflect_MagicAccessorImpl_klass())) {
570 return true;
571 }
572
573 // Also allow all accesses from
574 // java/lang/invoke/MagicLambdaImpl subclasses to succeed trivially.
575 if (current_class->is_subclass_of(SystemDictionary::lambda_MagicLambdaImpl_klass())) {
564 return true; 576 return true;
565 } 577 }
566 578
567 return can_relax_access_check_for( 579 return can_relax_access_check_for(
568 current_class, field_class, classloader_only); 580 current_class, field_class, classloader_only);