8098557: Only init superintf if subclass, not sub interface inits

Must exclude jck lang exec05001m311_rt until fixed.

Reviewed-by: lfoltan, hseigel, dholmes
This commit is contained in:
Karen Kinnear 2015-11-25 09:08:51 -05:00
parent 8608ecb702
commit d63f180edb
2 changed files with 30 additions and 10 deletions

View file

@ -815,10 +815,13 @@ void InstanceKlass::initialize_impl(instanceKlassHandle this_k, TRAPS) {
}
}
// If C is an interface that declares a non-abstract, non-static method,
// the initialization of a class (not an interface) that implements C directly or
// indirectly.
// Recursively initialize any superinterfaces that declare default methods
// Only need to recurse if has_default_methods which includes declaring and
// inheriting default methods
if (this_k->has_default_methods()) {
if (!this_k->is_interface() && this_k->has_default_methods()) {
this_k->initialize_super_interfaces(this_k, CHECK);
}