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

Replace uses of Class.newInstance

XMLWordPrintable

      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()
       
      There are 12 calls to newInstance in JavaFX, 9 in javafx.graphics and 3 in javafx.fxml

            aghaisas Ajit Ghaisas
            kcr Kevin Rushforth
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: