[ http://issues.apache.org/jira/browse/DERBY-974?page=comments#action_12419927 ]
Kathey Marsden commented on DERBY-974: -------------------------------------- Hello Michael if you you are still monitoring this issue. I wanted to follow up and see if if you were still interested in pursuing posting a patch to issue. It seems like it would be very useful for Network Client not to lose properties. I hope that Deepa's comment answered your questions about creating a patch and tests. I looked briefly at ProperiesTest.java and see that it does show how using keys() would be a problem. I think though that it would be good as Deepa said to have a reproducible case/test to show the functional impact with Derby. I will be happy to try out and review your patch/repro if/when you submit it. Please let us know if you are still interested in working on this issue. > ClientDriver can lose some connection properties > ------------------------------------------------ > > Key: DERBY-974 > URL: http://issues.apache.org/jira/browse/DERBY-974 > Project: Derby > Type: Bug > Components: Network Client > Versions: 10.1.2.1, 10.1.2.2 > Environment: Linux, Sun JRE 1.5 > Reporter: Michael Hackett > Priority: Minor > Attachments: ClientDriver.java-diff, PropertiesTest.java > > 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. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
