diff --git a/org.springframework.jdbc/src/main/java/org/springframework/jdbc/datasource/AbstractDriverBasedDataSource.java b/org.springframework.jdbc/src/main/java/org/springframework/jdbc/datasource/AbstractDriverBasedDataSource.java index 06b142cc798..6df3d53e571 100644 --- a/org.springframework.jdbc/src/main/java/org/springframework/jdbc/datasource/AbstractDriverBasedDataSource.java +++ b/org.springframework.jdbc/src/main/java/org/springframework/jdbc/datasource/AbstractDriverBasedDataSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -109,7 +109,7 @@ public abstract class AbstractDriverBasedDataSource extends AbstractDataSource { /** - * This implementation delegates to getConnectionFromDriver, + * This implementation delegates to {@code getConnectionFromDriver}, * using the default username and password of this DataSource. * @see #getConnectionFromDriver(String, String) * @see #setUsername @@ -120,7 +120,7 @@ public abstract class AbstractDriverBasedDataSource extends AbstractDataSource { } /** - * This implementation delegates to getConnectionFromDriver, + * This implementation delegates to {@code getConnectionFromDriver}, * using the given username and password. * @see #getConnectionFromDriver(String, String) */ @@ -139,7 +139,8 @@ public abstract class AbstractDriverBasedDataSource extends AbstractDataSource { * @see java.sql.Driver#connect(String, java.util.Properties) */ protected Connection getConnectionFromDriver(String username, String password) throws SQLException { - Properties props = new Properties(getConnectionProperties()); + Properties props = new Properties(); + props.putAll(getConnectionProperties()); if (username != null) { props.setProperty("user", username); }