[ 
https://issues.apache.org/jira/browse/DERBY-974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12535871
 ] 

jorgenlo edited comment on DERBY-974 at 10/18/07 2:46 AM:
---------------------------------------------------------------

Just what I needed! DriverTest definitely makes this testing cleaner and 
easier. Thanks for the tip, Knut :)

v2 of the patch adds a test to DriverTest instead of ConnectionTest. This moves 
the test from jdbc4 to jdbcapi, which means that it will be tested with older 
jvms as well.

All tests completed without errors.

      was (Author: jorgenlo):
    Just what I needed! DriverTest definitely makes this testing cleaner and 
easier. Thanks for the tip, Knut :)

v2 of the patch adds a test to DriverTest instead of ConnectionTest. This moves 
the test from jdbc4 to jdbcapi, which means that it will be tested with older 
jvms as well.
  
> ClientDriver can lose some connection properties
> ------------------------------------------------
>
>                 Key: DERBY-974
>                 URL: https://issues.apache.org/jira/browse/DERBY-974
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.1.2.1, 10.1.3.1, 10.4.0.0
>         Environment: Linux, Sun JRE 1.5
>            Reporter: Michael Hackett
>            Assignee: Jørgen Løland
>            Priority: Minor
>         Attachments: ClientDriver.java-diff, derby-974-1.diff, 
> derby-974-1.stat, derby-974-2.diff, derby-974-2.stat, 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.
-
You can reply to this email to add a comment to the issue online.

Reply via email to