ECJ and OpenJDK b26

Andrew John Hughes gnu_andrew at
Mon May 26 11:10:15 PDT 2008

I came across a problem compiling
from b26 with ECJ, due to the addition of the @Override annotation:

# Running javac:
/usr/bin/ecj -1.5 -nowarn -sourcepath
-bootclasspath /home/andrew/builder/icedtea/bootstrap/jdk1.7.0/jre/lib/rt-closed.jar:/home/andrew/builder/icedtea/bootstrap/jdk1.7.0/jre/lib/tools.jar::/home/andrew/builder/icedtea/openjdk-ecj/build/linux-amd64/classes
-d /home/andrew/builder/icedtea/openjdk-ecj/build/linux-amd64/classes
1. ERROR in ../../../src/share/classes/javax/management/
(at line 117)
        public ValueExp apply(ObjectName name) throws
BadStringOperationException, BadBinaryOpValueExpException,
        BadAttributeValueExpException, InvalidApplicationException {

The method apply(ObjectName) of type AttributeValueExp must override a
superclass method
2. ERROR in ../../../src/share/classes/javax/management/
(at line 154)
        public void setMBeanServer(MBeanServer s)  {
The method setMBeanServer(MBeanServer) of type AttributeValueExp must
override a superclass method

ecj seems to be applying @Override only to superclasses and not to
interfaces (these methods are specified in the interface

Is this a bug in ECJ (3.3.0) or is javac overlooking this and
@Override should only be used with superclasses?
Andrew :-)

Support Free Java!
Contribute to GNU Classpath and the OpenJDK

PGP Key: 94EFD9D8 (
Fingerprint: F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8

More information about the distro-pkg-dev mailing list