I just filed my first Android bug.

I just filed my first Android bug. The following Java code incorrectly throws the Dalvik error “Implementation of Lnet/chrisdolan/scratch/MainActivity$AbstractAltHelloer;.sayHi is not public” (because it’s declared protected in the superclass) while the Oracle JVM happily accepts it.

public interface Helloer {

    public String sayHi();

}

public static abstract class AbstractHelloer {

    protected abstract String sayHi();

}

public static abstract class AbstractAltHelloer extends AbstractHelloer implements Helloer {

}

public static class MyHelloer extends AbstractAltHelloer {

    public String sayHi() { return “Hi!”; };

}

http://code.google.com/p/android/issues/detail?id=42991

http://code.google.com/p/android/issues/detail?id=42991