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

polymorphic signature calls don't share the same CP entries

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 7
    • 7
    • tools
    • b116
    • unknown
    • generic
    • Verified

      The following example:

      import java.dyn.*;

      class Test {

      void test(MethodHandle mh) throws Throwable {
         String s = mh.<String>invokeExact("daddy",'d','n'); //this works but gets warning to use new syntax
         s = (String)mh.invokeExact("bunny",'n','d'); //this throws exception
      }
      }

      produces a classfile that uses two separate constant pool method entries for encoding the signatures of the PS methods.

            mcimadamore Maurizio Cimadamore
            mcimadamore Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: