diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/UserCredentialsDataSourceAdapter.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/UserCredentialsDataSourceAdapter.java index 9470fbf7e0..e707d6f49a 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/UserCredentialsDataSourceAdapter.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/UserCredentialsDataSourceAdapter.java @@ -148,9 +148,10 @@ public class UserCredentialsDataSourceAdapter extends DelegatingDataSource { /** * Determine whether there are currently thread-bound credentials, * using them if available, falling back to the statically specified - * username and password (i.e. values of the bean properties) else. + * username and password (i.e. values of the bean properties) otherwise. *
Delegates to {@link #doGetConnection(String, String)} with the * determined credentials as parameters. + * @see #doGetConnection */ @Override public Connection getConnection() throws SQLException { @@ -208,7 +209,7 @@ public class UserCredentialsDataSourceAdapter extends DelegatingDataSource { public final String password; - private JdbcUserCredentials(String username, String password) { + public JdbcUserCredentials(String username, String password) { this.username = username; this.password = password; } diff --git a/spring-jms/src/main/java/org/springframework/jms/connection/UserCredentialsConnectionFactoryAdapter.java b/spring-jms/src/main/java/org/springframework/jms/connection/UserCredentialsConnectionFactoryAdapter.java index 688d1158bf..171032a4e3 100644 --- a/spring-jms/src/main/java/org/springframework/jms/connection/UserCredentialsConnectionFactoryAdapter.java +++ b/spring-jms/src/main/java/org/springframework/jms/connection/UserCredentialsConnectionFactoryAdapter.java @@ -149,7 +149,7 @@ public class UserCredentialsConnectionFactoryAdapter /** * Determine whether there are currently thread-bound credentials, * using them if available, falling back to the statically specified - * username and password (i.e. values of the bean properties) else. + * username and password (i.e. values of the bean properties) otherwise. * @see #doCreateConnection */ @Override @@ -331,13 +331,11 @@ public class UserCredentialsConnectionFactoryAdapter public final String password; - - private JmsUserCredentials(String username, String password) { + public JmsUserCredentials(String username, String password) { this.username = username; this.password = password; } - @Override public String toString() { return "JmsUserCredentials[username='" + this.username + "',password='" + this.password + "']";