hotspot/src/share/vm/classfile/defaultMethods.cpp
changeset 41669 2091069b6851
parent 37480 291ee208fb72
child 42059 36a9d4ce3951
--- a/hotspot/src/share/vm/classfile/defaultMethods.cpp	Wed Sep 28 18:40:50 2016 +0300
+++ b/hotspot/src/share/vm/classfile/defaultMethods.cpp	Mon Oct 03 21:48:21 2016 -0400
@@ -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 @@
       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 @@
       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()) {