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

REGRESSION: Generated error message unhelpful for missing methods

    XMLWordPrintable

Details

    • mantis
    • x86
    • windows_98
    • Verified

    Description



      Name: nt126004 Date: 04/11/2002


      FULL PRODUCT VERSION :
      java version "1.4.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
      Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)

      FULL OPERATING SYSTEM VERSION :
      all OS's

      A DESCRIPTION OF THE PROBLEM :
      The following is the error message I get:

      "foo should be declared abstract; it does not define
      someMethod() in foo"

      The second occurence of "foo" should be the interface
      defining the method, not a repeat of the name of the class
      that should be abstract. (If you're implementing a number
      of interfaces, it's easy to stare dumbly asking, "Now where
      the hell . . ." Combine this with names in your own
      interfaces that conflict with names in java's interfaces
      and you're in real trouble. Guess how I know.)

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1.Type this into t.java: class t implements Runnable{}
      2.javac t.java

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      Now says: . . . t should be declared abstract: it does not
      define run() in t . . .

      Should say: . . . t should be declared abstract: it does
      not define run() in java.lang.Runnable

      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      class t implements Runnable {}
      ---------- END SOURCE ----------

      Release Regression From : 1.2.2
      The above release value was the last known release where this
      bug was known to work. Since then there has been a regression.

      (Review ID: 145238)
      ======================================================================

      Attachments

        Activity

          People

            gafter Neal Gafter
            nthompsosunw Nathanael Thompson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: