Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4839284

Javac fails to compile valid source code.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.2
    • 1.4.2
    • tools
    • b21
    • x86, sparc
    • linux_redhat_7.2, solaris_8

        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]$

              gafter Neal Gafter (Inactive)
              thurka Tomáš Hůrka
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: