Github user jwagenleitner commented on a diff in the pull request:

    https://github.com/apache/groovy/pull/491#discussion_r99844410
  
    --- Diff: subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java ---
    @@ -578,17 +578,26 @@ public static Sql newInstance(Map<String, Object> 
args) throws SQLException, Cla
     
             Object url = sqlArgs.remove("url");
             Connection connection;
    +        LOG.fine("url = " + url);
             if (props != null) {
    -            System.err.println("url = " + url);
    -            System.err.println("props = " + props);
    -            connection = DriverManager.getConnection(url.toString(), new 
Properties(props));
    +            Properties propsCopy = new Properties(props);
    +            connection = DriverManager.getConnection(url.toString(), 
propsCopy);
    +            if (propsCopy.containsKey("password")) {
    +                // don't log the password
    +                propsCopy = new Properties(propsCopy);
    --- End diff --
    
    I don't think this is needed since it's already been copied?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to