You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Thomas Weise (JIRA)" <ji...@apache.org> on 2017/12/22 21:58:00 UTC

[jira] [Commented] (GROOVY-8422) Incorrect properties copy in Sql.newInstance

    [ https://issues.apache.org/jira/browse/GROOVY-8422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16301989#comment-16301989 ] 

Thomas Weise commented on GROOVY-8422:
--------------------------------------

https://github.com/apache/groovy/blob/4139798c5715403bcba0de2bf64d80a5aa1cb613/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java#L585

{code}
        if (props != null) {
            Properties propsCopy = new Properties(props);
            connection = DriverManager.getConnection(url.toString(), propsCopy);
{code}

> Incorrect properties copy in Sql.newInstance 
> ---------------------------------------------
>
>                 Key: GROOVY-8422
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8422
>             Project: Groovy
>          Issue Type: Bug
>          Components: SQL processing
>    Affects Versions: 2.4.13
>            Reporter: Thomas Weise
>
> The constructor `Properties(Properties defaults)` does not create a copy, but a new object with the argument as defaults. That breaks JDBC drivers that expect the properties to be present in the object directly (enumerating of keys, containsKey etc.).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)