Uploaded image for project: 'Apache Gora'
  1. Apache Gora
  2. GORA-536

Avoid calling Class#newInstance

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 0.9
    • None
    • None

    Description

      Class::newInstance is deprecated starting in Java 9 - https://bugs.openjdk.java.net/browse/JDK-6850612 - because it may throw undeclared checked exceptions.

      The suggested replacement is getDeclaredConstructor().newInstance(), which will wrap the checked exceptions in InvocationException.

      Attachments

        Issue Links

          Activity

            People

              carlosrmng Carlos Muñoz
              yuzhihong@gmail.com Ted Yu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: