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

[lworld] Invoking a reflection-generated constructor for primitive class gives InstantiationError

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: repo-valhalla
    • Fix Version/s: repo-valhalla
    • Component/s: core-libs
    • Labels:

      Description

      As noted in JDK-8207315, the constructor invocation generated by jdk.internal.reflect.MethodAccessorGenerator doesn't work for primitive classes.

      Thus, invoking a static factory method for a primitive class more than 15 times will break (as controlled by jdk.internal.reflect.ReflectionFactory.inflationThreshold())

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jespersm Jesper Møller
              Reporter:
              jespersm Jesper Møller
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: