From 52126a71f6d0205deb6d9777a8b056814aff2e8a Mon Sep 17 00:00:00 2001 From: acorn Date: Wed, 20 Mar 2013 11:43:56 -0400 Subject: [PATCH] 8010017: lambda: reflection get(Declared)Methods support for default methods. Summary: Don't expose vm generated overpass (bridges to default methods). Reviewed-by: dholmes, fparain --- src/share/vm/prims/jvm.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/share/vm/prims/jvm.cpp b/src/share/vm/prims/jvm.cpp index 1c277b76c..ce6696126 100644 --- a/src/share/vm/prims/jvm.cpp +++ b/src/share/vm/prims/jvm.cpp @@ -1722,7 +1722,7 @@ JVM_ENTRY(jobjectArray, JVM_GetClassDeclaredMethods(JNIEnv *env, jclass ofClass, int i; for (i = 0; i < methods_length; i++) { methodHandle method(THREAD, methods->at(i)); - if (!method->is_initializer()) { + if (!method->is_initializer() && !method->is_overpass()) { if (!publicOnly || method->is_public()) { ++num_methods; } @@ -1736,7 +1736,7 @@ JVM_ENTRY(jobjectArray, JVM_GetClassDeclaredMethods(JNIEnv *env, jclass ofClass, int out_idx = 0; for (i = 0; i < methods_length; i++) { methodHandle method(THREAD, methods->at(i)); - if (!method->is_initializer()) { + if (!method->is_initializer() && !method->is_overpass()) { if (!publicOnly || method->is_public()) { oop m = Reflection::new_method(method, UseNewReflection, false, CHECK_NULL); result->obj_at_put(out_idx, m); -- GitLab