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

j.l.c.MethodTypeDesc::insertParameterTypes​ doesn't control type of parameters

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 12, 13
    • Fix Version/s: 13
    • Component/s: core-libs
    • Labels:
      None

      Description

      MethodTypeDesc insertParameterTypes(int pos, ClassDesc... paramTypes) allows to have paramTypes[i] == CD_void also the resulting method type can be more than 255 parameter slots

      Expected behavior​ should be as in the set of MethodType's methods:
      appendParameterTypes​(Class<?>... ptypesToInsert)
      appendParameterTypes​(List<Class<?>> ptypesToInsert)
      insertParameterTypes​(int num, Class<?>... ptypesToInsert)
      insertParameterTypes​(int num, List<Class<?>> ptypesToInsert)

      Throws:
      IllegalArgumentException - if any element of ptypesToInsert is void.class or if the resulting method type would have more than 255 parameter slots

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              vromero Vicente Arturo Romero Zaldivar
              Reporter:
              lkuskov Leonid Kuskov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: