db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Hackett (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-974) ClientDriver can lose some connection properties
Date Tue, 14 Feb 2006 03:33:09 GMT
    [ http://issues.apache.org/jira/browse/DERBY-974?page=comments#action_12366291 ] 

Michael Hackett commented on DERBY-974:

It doesn't appear to me to be closely related. It looks like the example code passes only
a connection URL to the ClientDriver, converting connection properties to Derby's URL format
before calling the driver. (Ironically, the example code in 546 does the conversion correctly,
which is exactly the problem in the ClientDriver that I'm reporting here.) The problem here
is with passing connection properties in the info argument instead of the URL.

> 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:,
>  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:
For more information on JIRA, see:

View raw message