Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-7032

Developer's Guide recommends use of a deprecated method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 10.15.2.0, 10.16.1.1
    • None
    • Documentation, JDBC
    • None
    • Normal

    Description

      The "Shutting down the system" topic in the Developer's Guide (and probably other places in the user documentation) recommends the following pattern for re-loading the engine driver after it was unloaded by a graceful system shutdown:

      Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
      

      However, if you use Java 9 or later to compile an application which follows that pattern, then you will get a deprecation warning. That is because Java 9 deprecated Class.newInstance(). Some future rev of the JDK may remove the method altogether.

      This issue was discovered while investigating DERBY-7031.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rhillegas Richard N. Hillegas
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: