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

Attempt to resolve abstract method in concrete class fails with AbstractMethodError

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: hs25, emb-8u26, 8, 9
    • Fix Version/s: 8u20
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b03
    • Verification:
      Not verified

      Backports

        Description

        Consider the following case:
          class T1 { public void m() {} }
          class T2 { public abstract void m(); }
          class T3 { public void m() {} }

        Call site: T3 { invokevirtual T2.m()V T3 }

        NB: class T2 isn't marked as abstract.

        VM: AbstractMethodError: p1.T2.m()V
        JVMS: T3.m() should be invoked

        The following check during method resolution is removed in JVMS-8 [1]:
        JVMS-5.4.3.3. Method Resolution
        "If method lookup succeeds and the method is abstract, but C is not abstract, method resolution throws an AbstractMethodError."

        ILW = HLM = P3

        I = H = JVMS-8 violation; severely affects testing of default methods
        L = L = javac doesn't generate such bytecode
        W = M = add ACC_ABSTRACT to class' attributes

        [1] http://cr.openjdk.java.net/~dlsmith/jsr335-0.9.1/J.html

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  ccheung Calvin Cheung
                  Reporter:
                  vlivanov Vladimir Ivanov
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: