1.1 --- a/src/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java Wed Oct 23 07:50:04 2013 +0200 1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java Wed Oct 23 10:28:10 2013 -0700 1.3 @@ -2087,13 +2087,6 @@ 1.4 return tree.sym.owner == syms.arrayClass; 1.5 } 1.6 1.7 - boolean isPrivateConstructor() { 1.8 - //hack needed to workaround 292 bug (8005122) 1.9 - //when 292 issue is fixed we should simply remove this 1.10 - return tree.sym.name == names.init && 1.11 - (tree.sym.flags() & PRIVATE) != 0; 1.12 - } 1.13 - 1.14 boolean receiverAccessible() { 1.15 //hack needed to workaround 292 bug (7087658) 1.16 //when 292 issue is fixed we should remove this and change the backend 1.17 @@ -2102,12 +2095,24 @@ 1.18 } 1.19 1.20 /** 1.21 + * The VM does not support access across nested classes (8010319). 1.22 + * Were that ever to change, this should be removed. 1.23 + */ 1.24 + boolean isPrivateInOtherClass() { 1.25 + return (tree.sym.flags() & PRIVATE) != 0 && 1.26 + !types.isSameType( 1.27 + types.erasure(tree.sym.enclClass().asType()), 1.28 + types.erasure(owner.enclClass().asType())); 1.29 + } 1.30 + 1.31 + /** 1.32 * Does this reference needs a bridge (i.e. var args need to be 1.33 * expanded or "super" is used) 1.34 */ 1.35 final boolean needsBridge() { 1.36 return isSuper || needsVarArgsConversion() || isArrayOp() || 1.37 - isPrivateConstructor() || !receiverAccessible(); 1.38 + isPrivateInOtherClass() || 1.39 + !receiverAccessible(); 1.40 } 1.41 1.42 Type generatedRefSig() {