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

Fix ConstantUtils.skipOverFieldSignature void case return value

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • 19.0.2, 21
    • core-libs
    • None
    • b17

      In ConstantUtils.skipOverFieldSignature, the current index instead of 0 is incorrectly returned if an invalid V is encountered.

      https://github.com/openjdk/jdk/blob/5726d31e56530bbe7dee61ae04b126e20cb3611d/src/java.base/share/classes/java/lang/constant/ConstantUtils.java#L196

      This issue doesn't directly permit creation of malformed ClassDesc or MethodTypeDesc, but it leads to ambiguous exceptions on certain inputs:

      jshell> java.lang.constant.MethodTypeDesc.ofDescriptor("(IIIIIIII[[[[V)V")

            asotona Adam Sotona
            liach Chen Liang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: