changeset 2016:b3a9d8ca17dd

Generate all static lambda methods as static. Only interface instance (default) methods still public awaiting VM fixes.
author rfield
date Tue, 23 Apr 2013 14:19:08 -0700
parents 472273f5522d
children 16dca72be9cf
files src/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java	Tue Apr 23 11:40:44 2013 +0100
+++ b/src/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java	Tue Apr 23 14:19:08 2013 -0700
@@ -1722,9 +1722,9 @@
 
                 // If instance access isn't needed, make it static.
                 // Interface instance methods must be default methods.
-                // Awaiting VM channges, interface methods are public
+                // Awaiting VM channges, default methods are public
                 translatedSym.flags_field = SYNTHETIC | 
-                        (inInterface? PUBLIC : PRIVATE) | 
+                        ((inInterface && thisReferenced)? PUBLIC : PRIVATE) | 
                         (thisReferenced? (inInterface? DEFAULT : 0) : STATIC);
 
                 //compute synthetic params