Skip to content

Commit 6ca2cb5

Browse files
committed
Polishing
(cherry picked from commit 106ae0c)
1 parent ce57d4a commit 6ca2cb5

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

spring-jdbc/src/main/java/org/springframework/jdbc/datasource/UserCredentialsDataSourceAdapter.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -148,9 +148,10 @@ public void removeCredentialsFromCurrentThread() {
148148
/**
149149
* Determine whether there are currently thread-bound credentials,
150150
* using them if available, falling back to the statically specified
151-
* username and password (i.e. values of the bean properties) else.
151+
* username and password (i.e. values of the bean properties) otherwise.
152152
* <p>Delegates to {@link #doGetConnection(String, String)} with the
153153
* determined credentials as parameters.
154+
* @see #doGetConnection
154155
*/
155156
@Override
156157
public Connection getConnection() throws SQLException {
@@ -202,13 +203,13 @@ protected Connection doGetConnection(@Nullable String username, @Nullable String
202203
/**
203204
* Inner class used as ThreadLocal value.
204205
*/
205-
private static class JdbcUserCredentials {
206+
private static final class JdbcUserCredentials {
206207

207208
public final String username;
208209

209210
public final String password;
210211

211-
private JdbcUserCredentials(String username, String password) {
212+
public JdbcUserCredentials(String username, String password) {
212213
this.username = username;
213214
this.password = password;
214215
}

spring-jms/src/main/java/org/springframework/jms/connection/UserCredentialsConnectionFactoryAdapter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public void removeCredentialsFromCurrentThread() {
149149
/**
150150
* Determine whether there are currently thread-bound credentials,
151151
* using them if available, falling back to the statically specified
152-
* username and password (i.e. values of the bean properties) else.
152+
* username and password (i.e. values of the bean properties) otherwise.
153153
* @see #doCreateConnection
154154
*/
155155
@Override
@@ -331,7 +331,7 @@ private static final class JmsUserCredentials {
331331

332332
public final String password;
333333

334-
private JmsUserCredentials(String username, String password) {
334+
public JmsUserCredentials(String username, String password) {
335335
this.username = username;
336336
this.password = password;
337337
}

0 commit comments

Comments
 (0)