Mercurial > hg > graal-compiler
diff src/share/vm/runtime/reflection.cpp @ 18104:eaf39a954227
Merge with jdk8u25-b17
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Thu, 16 Oct 2014 11:57:39 +0200 |
parents | 4ca6dc0799b6 2373a1f4987c |
children |
line wrap: on
line diff
--- a/src/share/vm/runtime/reflection.cpp Thu Oct 16 11:16:01 2014 +0200 +++ b/src/share/vm/runtime/reflection.cpp Thu Oct 16 11:57:39 2014 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -482,7 +482,7 @@ ik = InstanceKlass::cast(hc); // There's no way to make a host class loop short of patching memory. - // Therefore there cannot be a loop here unles there's another bug. + // Therefore there cannot be a loop here unless there's another bug. // Still, let's check for it. assert(--inf_loop_check > 0, "no host_klass loop"); } @@ -551,7 +551,8 @@ if (access.is_protected()) { if (!protected_restriction) { // See if current_class (or outermost host class) is a subclass of field_class - if (host_class->is_subclass_of(field_class)) { + // An interface may not access protected members of j.l.Object + if (!host_class->is_interface() && host_class->is_subclass_of(field_class)) { if (access.is_static() || // static fields are ok, see 6622385 current_class == resolved_class || field_class == resolved_class ||