javac from 1.4.2 b18 cannot compile sources for Sun ONE Studio 5.0 "Nevada" = NetBeans 3.5, even after working around bug #4832887:
all-jarpackager:
Building module jarpackager...
init:
compile:
Compiling 72 source files to /space/src/nevada/nb_all/jarpackager/src
/space/src/nevada/nb_all/jarpackager/src/org/netbeans/modules/jarpackager/JarCompiler.java:104: abstract method equals(java.lang.Object) cannot be accessed directly
return super.equals(obj) && (jc == other.jc);
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -deprecation for details.
1 error
The bug can be narrowed down to a small test case:
testabstractequals$ cat TestAbstractEquals.java
public class TestAbstractEquals {
public interface I {
boolean equals(Object o);
}
public abstract class A implements I {}
public class B extends A {
public boolean equals(Object o) {
return super.equals(o);
}
}
}
testabstractequals$ /space/jdk1.4.2-beta-b18/bin/javac TestAbstractEquals.java
TestAbstractEquals.java:8: abstract method equals(java.lang.Object) cannot be accessed directly
return super.equals(o);
^
1 error
testabstractequals$ /space/jdk1.4.1_01/bin/javac TestAbstractEquals.java
testabstractequals$
Of course super from B.equals refers to Object.equals which is not abstract.
This is a regression from 1.4.1_01.
###@###.### 2003-03-21
###@###.### 2003-03-21
all-jarpackager:
Building module jarpackager...
init:
compile:
Compiling 72 source files to /space/src/nevada/nb_all/jarpackager/src
/space/src/nevada/nb_all/jarpackager/src/org/netbeans/modules/jarpackager/JarCompiler.java:104: abstract method equals(java.lang.Object) cannot be accessed directly
return super.equals(obj) && (jc == other.jc);
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -deprecation for details.
1 error
The bug can be narrowed down to a small test case:
testabstractequals$ cat TestAbstractEquals.java
public class TestAbstractEquals {
public interface I {
boolean equals(Object o);
}
public abstract class A implements I {}
public class B extends A {
public boolean equals(Object o) {
return super.equals(o);
}
}
}
testabstractequals$ /space/jdk1.4.2-beta-b18/bin/javac TestAbstractEquals.java
TestAbstractEquals.java:8: abstract method equals(java.lang.Object) cannot be accessed directly
return super.equals(o);
^
1 error
testabstractequals$ /space/jdk1.4.1_01/bin/javac TestAbstractEquals.java
testabstractequals$
Of course super from B.equals refers to Object.equals which is not abstract.
This is a regression from 1.4.1_01.
###@###.### 2003-03-21
###@###.### 2003-03-21
- duplicates
-
JDK-4758654 incorrect overload resolution for super.method() when inherited abstract
- Resolved