Uploaded image for project: 'Commons DbUtils'
  1. Commons DbUtils
  2. DBUTILS-52

QueryRunner is not thread-safe

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.2
    • None

    Description

      sebb pointed out: "QueryRunner Javadoc says the class is thread-safe. However it has a protected mutable variable DataSource which can also be set/got via public methods. If one thread sets the variable, another may not see the correct value, so the class is not thread-safe."

      We should make the DataSource final and remove the setter.

      Attachments

        Activity

          People

            dfabulich Daniel Fabulich
            dfabulich Daniel Fabulich
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: