Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-779

Logic error in stop() method of OSGi bundle activator

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.0
    • Fix Version/s: 2.6.1
    • Component/s: Other
    • Labels:
      None

      Description

      The code

          if (DriverManager.getDriver("jdbc:mariadb:") != null) {
            SchedulerServiceProviderHolder.close();
          }
      

      assumes that getDriver returns null if the driver is not found. It does not, it never returns null. It throws a SQLException with message "No suitable driver" and error code 08001.
      Please replace by a try-catch clause.

        Attachments

          Activity

            People

            Assignee:
            diego dupin Diego Dupin
            Reporter:
            domagojcc Domagoj Cosic
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: