hotspot/src/share/vm/classfile/defaultMethods.cpp
changeset 41669 2091069b6851
parent 37480 291ee208fb72
child 42059 36a9d4ce3951
equal deleted inserted replaced
41668:e9c6bbf513e5 41669:2091069b6851
     1 /*
     1 /*
     2  * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   912     if (slot->is_bound()) {
   912     if (slot->is_bound()) {
   913       MethodFamily* method = slot->get_binding();
   913       MethodFamily* method = slot->get_binding();
   914       BytecodeBuffer buffer;
   914       BytecodeBuffer buffer;
   915 
   915 
   916       if (log_is_enabled(Debug, defaultmethods)) {
   916       if (log_is_enabled(Debug, defaultmethods)) {
   917         ResourceMark rm;
   917         ResourceMark rm(THREAD);
   918         outputStream* logstream = Log(defaultmethods)::debug_stream();
   918         outputStream* logstream = Log(defaultmethods)::debug_stream();
   919         logstream->print("for slot: ");
   919         logstream->print("for slot: ");
   920         slot->print_on(logstream);
   920         slot->print_on(logstream);
   921         logstream->cr();
   921         logstream->cr();
   922         if (method->has_target()) {
   922         if (method->has_target()) {
   927       }
   927       }
   928 
   928 
   929       if (method->has_target()) {
   929       if (method->has_target()) {
   930         Method* selected = method->get_selected_target();
   930         Method* selected = method->get_selected_target();
   931         if (selected->method_holder()->is_interface()) {
   931         if (selected->method_holder()->is_interface()) {
       
   932           assert(!selected->is_private(), "pushing private interface method as default");
   932           defaults.push(selected);
   933           defaults.push(selected);
   933         }
   934         }
   934       } else if (method->throws_exception()) {
   935       } else if (method->throws_exception()) {
   935         int max_stack = assemble_method_error(&bpool, &buffer,
   936         int max_stack = assemble_method_error(&bpool, &buffer,
   936            method->get_exception_name(), method->get_exception_message(), CHECK);
   937            method->get_exception_name(), method->get_exception_message(), CHECK);