javac bug: defender method processing

Brian Goetz brian.goetz at
Wed Oct 27 14:43:42 PDT 2010

I created this file:

src/ (no package)

class Impl {
     public static int one() { return 1 };

and this test file:


package junit;

import junit.framework.TestCase;

public class SimpleDefenderTest extends TestCase {
     private static interface A {
         public extension int get() default;

     private static class C implements A {

     public void testSimpleWeave() {
         C c = new C();
         assertEquals(1, c.get());

It failed to compile, with this error:

     [javac] src/junit/ cannot find symbol
     [javac]         public extension int get() default;
     [javac]                              ^
     [javac]   symbol:   variable Impl
     [javac]   location: interface A
     [javac] 1 error

The problem seems to be either that Impl was in the empty package, or maybe 
that it was just in another package.  I moved it to the same package and it 

More information about the lambda-dev mailing list