-
Bug
-
Resolution: Fixed
-
P4
-
1.4.2
-
b21
-
x86, sparc
-
linux_redhat_7.2, solaris_8
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2067279 | 5.0 | Neal Gafter | P4 | Resolved | Fixed | tiger |
The following code fails to compile with jdk 1.4.2 beta 19. It works fine with 1.4.1_02 and 1.3.1_05.
[/tmp]$ cat Test.java
import java.util.*;
public class Test extends AbstractCollection {
public int hashCode() {
return super.hashCode();
}
public Iterator iterator() {
return null;
}
public int size() {
return 0;
}
}
[/tmp]$ javac Test.java
Test.java:8: abstract method hashCode() cannot be accessed directly
return super.hashCode();
^
1 error
[/tmp]$
[/tmp]$ cat Test.java
import java.util.*;
public class Test extends AbstractCollection {
public int hashCode() {
return super.hashCode();
}
public Iterator iterator() {
return null;
}
public int size() {
return 0;
}
}
[/tmp]$ javac Test.java
Test.java:8: abstract method hashCode() cannot be accessed directly
return super.hashCode();
^
1 error
[/tmp]$
- backported by
-
JDK-2067279 Javac fails to compile valid source code.
- Resolved
- duplicates
-
JDK-4870088 Changed compiler behaviour for interfaces & abstract classes with common methods
- Closed
- relates to
-
JDK-4761586 overload resolution for super.method() when intf overrider inherited from Object
- Resolved
-
JDK-4758654 incorrect overload resolution for super.method() when inherited abstract
- Resolved