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

Javac creates a class files that causes AbstractMethodError

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3
    • None
    • 5.0
    • tools
    • generic
    • generic

    Description


      Compile the following code and run it. You'll get:

      Exception in thread "main" java.lang.AbstractMethodError: Bar.doIt()Ljava/lang/String;
              at JavacTest.main(JavacTest.java:8)

      ------------------------------------------------

      public class JavacTest {
          public static void main(String[] args) {
              IBar b = new Bar();
              String x = b.doIt();
          }
      }

      class Foo<T> {
          public final T doIt() { return null; }
      }

      interface IBar {
          String doIt();
      }

      class Bar extends Foo<String> implements IBar {
      }

      ###@###.### 2005-05-13 21:38:48 GMT

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kkawagucsunw Kohsuke Kawaguchi (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: