Skip to content

Commit 21f2b95

Browse files
committed
Merge pull request #23762 from izeye
* pr/23762: Polish assertions Polish Closes gh-23762
2 parents 0aa0cba + 72eaf93 commit 21f2b95

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourcePropertiesTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ void determineUsernameWhenEmpty() throws Exception {
103103
DataSourceProperties properties = new DataSourceProperties();
104104
properties.setUsername("");
105105
properties.afterPropertiesSet();
106-
assertThat(properties.getUsername());
106+
assertThat(properties.getUsername()).isEqualTo("");
107107
assertThat(properties.determineUsername()).isEqualTo("sa");
108108
}
109109

@@ -112,7 +112,7 @@ void determineUsernameWhenNull() throws Exception {
112112
DataSourceProperties properties = new DataSourceProperties();
113113
properties.setUsername(null);
114114
properties.afterPropertiesSet();
115-
assertThat(properties.getUsername());
115+
assertThat(properties.getUsername()).isNull();
116116
assertThat(properties.determineUsername()).isEqualTo("sa");
117117
}
118118

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/EmbeddedDatabaseConnection.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ boolean isDriverCompatible(String driverClass) {
140140
* database type.
141141
* @param driverClass the driver class
142142
* @return true if the driver class is one of the embedded types
143-
* @deprecated since 2.3.5 in favor of {@link #isEmbedded(String, String)}
143+
* @deprecated since 2.4.0 in favor of {@link #isEmbedded(String, String)}
144144
*/
145145
@Deprecated
146146
public static boolean isEmbedded(String driverClass) {
@@ -151,8 +151,9 @@ public static boolean isEmbedded(String driverClass) {
151151
* Convenience method to determine if a given driver class name and url represent an
152152
* embedded database type.
153153
* @param driverClass the driver class
154-
* @param url the jdbc url (can be {@code null)}
154+
* @param url the jdbc url (can be {@code null})
155155
* @return true if the driver class and url refer to an embedded database
156+
* @since 2.4.0
156157
*/
157158
public static boolean isEmbedded(String driverClass, String url) {
158159
if (driverClass == null) {

0 commit comments

Comments
 (0)