8081800: AbstractMethodError when evaluating a private method in an interface via debugger

Reviewed-by: acorn, dcubed, coleenp
This commit is contained in:
David Holmes 2016-10-03 21:48:21 -04:00
parent e67d5a890c
commit d1856645bc
18 changed files with 394 additions and 95 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2016, 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
@ -914,7 +914,7 @@ static void create_defaults_and_exceptions(
BytecodeBuffer buffer;
if (log_is_enabled(Debug, defaultmethods)) {
ResourceMark rm;
ResourceMark rm(THREAD);
outputStream* logstream = Log(defaultmethods)::debug_stream();
logstream->print("for slot: ");
slot->print_on(logstream);
@ -929,6 +929,7 @@ static void create_defaults_and_exceptions(
if (method->has_target()) {
Method* selected = method->get_selected_target();
if (selected->method_holder()->is_interface()) {
assert(!selected->is_private(), "pushing private interface method as default");
defaults.push(selected);
}
} else if (method->throws_exception()) {