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

ClientDriver can lose some connection properties

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 10.1.2.1, 10.1.3.1, 10.4.1.3
    • 10.3.2.1, 10.4.1.3
    • Network Client
    • None
    • Linux, Sun JRE 1.5

    Description

      Internally, the ClientDriver class's appendDatabaseAttributes() method uses keys() on the connection properties to get a list of the property names. However, this misses any properties in the default set. The correct method for a Properties object is propertyNames(). This will return the same type of object as keys(), but will include all properties.

      (It is unfortunate that Sun chose to make Properties a subclass of Hashtable, instead of giving Properties a Hashtable, as the former exposes too much implementation.)

      The fix is to simply replace calls to keys() on all Property objects to use propertyNames(). A quick search revealed that this is not the only place in the code base where this is done, so a more thorough scan should be made.

      Attachments

        1. ClientDriver.java-diff
          0.9 kB
          Michael Hackett
        2. derby-974-1.diff
          2 kB
          Jorgen Loland
        3. derby-974-1.stat
          0.1 kB
          Jorgen Loland
        4. derby-974-2.diff
          2 kB
          Jorgen Loland
        5. derby-974-2.stat
          0.1 kB
          Jorgen Loland
        6. derby-974-3.diff
          2 kB
          Jorgen Loland
        7. PropertiesTest.java
          1 kB
          Michael Hackett

        Activity

          People

            jorgenlo Jorgen Loland
            crimson Michael Hackett
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: