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

Replace uses of Class.newInstance in android/ios specific files

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: openjfx16
    • Fix Version/s: tbd
    • Component/s: javafx
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      android

      Description

      The Class.newInstance() method is deprecated in favor of Contructor.newinstance(). According to the API docs for the former:

          clazz.newInstance()

      can be replaced by

          clazz.getDeclaredConstructor().newInstance()

      In JavaFX codebase, we did above replacement (except for the android build) under - JDK-8264138.

      This bug is to identify and replace similar instances in files for the android and ios builds.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jvos Johan Vos
              Reporter:
              aghaisas Ajit Ghaisas
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: