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

Can't call default methods from JNI

    XMLWordPrintable

Details

    • b04
    • Verified

    Backports

      Description

        Reported at: http://mail.openjdk.java.net/pipermail/hotspot-dev/2014-January/012320.html

        interface A {
            default int getOne() {
                return 1;
            }
        }

        class Impl implements A {
            public int getOne() {
                return 2;
            }
        }

        It is not possible to call A.getOne() using JNI since CallNonvirtual<type>Method() does not consider default methods.

        Attachments

          1. impl.c
            1 kB
          2. ImplTest.java
            0.5 kB

          Issue Links

            Activity

              People

                sla Staffan Larsen (Inactive)
                sla Staffan Larsen (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: