mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
6622385: Accessing protected static methods
Protected contraints should only be applied if member is not static Reviewed-by: acorn, coleenp
This commit is contained in:
parent
4a831d45f0
commit
849e0dfc44
1 changed files with 2 additions and 1 deletions
|
@ -500,7 +500,8 @@ bool Reflection::verify_field_access(klassOop current_class,
|
|||
if (!protected_restriction) {
|
||||
// See if current_class is a subclass of field_class
|
||||
if (Klass::cast(current_class)->is_subclass_of(field_class)) {
|
||||
if (current_class == resolved_class ||
|
||||
if (access.is_static() || // static fields are ok, see 6622385
|
||||
current_class == resolved_class ||
|
||||
field_class == resolved_class ||
|
||||
Klass::cast(current_class)->is_subclass_of(resolved_class) ||
|
||||
Klass::cast(resolved_class)->is_subclass_of(current_class)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue