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

setConfiguration not being called on classes that extend ConfigurableSocketFactory

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 2.7.0
    • configuration
    • None

    Description

      In my project, I have a class that extends ConfigurableSocketFactory, but the setConfiguration method is never called. I added a breakpoint to if (socketFactoryClass.isInstance(ConfigurableSocketFactory.class)) {, and the expression was evaluating to false.

      From my googling, I landed at https://stackoverflow.com/questions/31083699/java-class-isinstance-always-returns-false, which indicated that the evaluation was being done backwards.

      When I evaluated ConfigurableSocketFactory.class.isInstance(socketFactory), the result was true

      Attachments

        Activity

          I've created a PR that fixes this issue:

          https://github.com/mariadb-corporation/mariadb-connector-j/pull/157

          Could y'all please take a look and merge it? Thanks!

          shahmirn Shahmir Noorani added a comment - I've created a PR that fixes this issue: https://github.com/mariadb-corporation/mariadb-connector-j/pull/157 Could y'all please take a look and merge it? Thanks!
          diego dupin Diego Dupin added a comment -

          thanks for the report and good fix.
          This is now merged in develop branch.
          This will be released in 2.6.3 version

          diego dupin Diego Dupin added a comment - thanks for the report and good fix. This is now merged in develop branch. This will be released in 2.6.3 version

          People

            diego dupin Diego Dupin
            shahmirn Shahmir Noorani
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.