Skip to content

Commit 5427d77

Browse files
izeyesnicoll
authored andcommitted
Polish
Closes gh-14293
1 parent 3d732e8 commit 5427d77

File tree

4 files changed

+11
-15
lines changed

4 files changed

+11
-15
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/mongo/MongoDataAutoConfiguration.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,9 @@ public MongoDbFactory withSession(ClientSession session) {
185185
}
186186

187187
/**
188-
* Check if either a {@link com.mongodb.MongoClient} or
189-
* {@link com.mongodb.client.MongoClient} bean is available.
188+
* Check if either a {@link MongoClient com.mongodb.MongoClient} or
189+
* {@link com.mongodb.client.MongoClient com.mongodb.client.MongoClient} bean is
190+
* available.
190191
*/
191192
static class AnyMongoClientAvailable extends AnyNestedCondition {
192193

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ private Object getNoJtaPlatformManager() {
220220
// Continue searching
221221
}
222222
}
223-
throw new IllegalStateException("No available JtaPlatform candidates amongst"
223+
throw new IllegalStateException("No available JtaPlatform candidates amongst "
224224
+ Arrays.toString(NO_JTA_PLATFORM_CLASSES));
225225
}
226226

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/MongoAutoConfigurationTests.java

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,26 +50,22 @@ public void clientExists() {
5050

5151
@Test
5252
public void optionsAdded() {
53-
this.contextRunner.withPropertyValues("spring.data.mongodb.host:localhost")
54-
.withUserConfiguration(OptionsConfig.class)
53+
this.contextRunner.withUserConfiguration(OptionsConfig.class)
5554
.run((context) -> assertThat(context.getBean(MongoClient.class)
5655
.getMongoClientOptions().getSocketTimeout()).isEqualTo(300));
5756
}
5857

5958
@Test
6059
public void optionsAddedButNoHost() {
61-
this.contextRunner
62-
.withPropertyValues("spring.data.mongodb.uri:mongodb://localhost/test")
63-
.withUserConfiguration(OptionsConfig.class)
60+
this.contextRunner.withUserConfiguration(OptionsConfig.class)
6461
.run((context) -> assertThat(context.getBean(MongoClient.class)
6562
.getMongoClientOptions().getSocketTimeout()).isEqualTo(300));
6663
}
6764

6865
@Test
6966
public void optionsSslConfig() {
70-
this.contextRunner
71-
.withPropertyValues("spring.data.mongodb.uri:mongodb://localhost/test")
72-
.withUserConfiguration(SslOptionsConfig.class).run((context) -> {
67+
this.contextRunner.withUserConfiguration(SslOptionsConfig.class)
68+
.run((context) -> {
7369
assertThat(context).hasSingleBean(MongoClient.class);
7470
MongoClient mongo = context.getBean(MongoClient.class);
7571
MongoClientOptions options = mongo.getMongoClientOptions();
@@ -81,9 +77,8 @@ public void optionsSslConfig() {
8177

8278
@Test
8379
public void doesNotCreateMongoClientWhenAlreadyDefined() {
84-
this.contextRunner
85-
.withPropertyValues("spring.data.mongodb.uri:mongodb://localhost/test")
86-
.withUserConfiguration(FallbackMongoClientConfig.class).run((context) -> {
80+
this.contextRunner.withUserConfiguration(FallbackMongoClientConfig.class)
81+
.run((context) -> {
8782
assertThat(context).doesNotHaveBean(MongoClient.class);
8883
assertThat(context)
8984
.hasSingleBean(com.mongodb.client.MongoClient.class);

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/json/JacksonJsonParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class JacksonJsonParser extends AbstractJsonParser {
3737
private ObjectMapper objectMapper; // Late binding
3838

3939
/**
40-
* Creates a instance with the specified {@link ObjectMapper}.
40+
* Creates an instance with the specified {@link ObjectMapper}.
4141
* @param objectMapper the object mapper to use
4242
*/
4343
public JacksonJsonParser(ObjectMapper objectMapper) {

0 commit comments

Comments
 (0)