Skip to content

Commit 37c8c36

Browse files
izeyesnicoll
authored andcommitted
Polish
Closes gh-6671
1 parent 96d5def commit 37c8c36

File tree

9 files changed

+9
-12
lines changed

9 files changed

+9
-12
lines changed

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitAutoConfiguration.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ public CachingConnectionFactory rabbitConnectionFactory(RabbitProperties config)
9494
factory.setHost(config.determineHost());
9595
}
9696
factory.setPort(config.determinePort());
97-
factory.setHost(config.determineHost());
9897
if (config.determineUsername() != null) {
9998
factory.setUsername(config.determineUsername());
10099
}

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ public String getVirtualHost() {
243243
/**
244244
* If addresses have been set and the first address has a virtual host it is returned.
245245
* Otherwise returns the result of calling {@code getVirtualHost()}.
246-
* @return the password or {@code null}
246+
* @return the virtual host or {@code null}
247247
* @see #setAddresses(String)
248248
* @see #getVirtualHost()
249249
*/
@@ -755,7 +755,7 @@ private String parseUsernameAndPassword(String input) {
755755

756756
private String parseVirtualHost(String input) {
757757
int hostIndex = input.indexOf("/");
758-
if (hostIndex >= 0 && hostIndex < input.length()) {
758+
if (hostIndex >= 0) {
759759
this.virtualHost = input.substring(hostIndex + 1);
760760
if (this.virtualHost.length() == 0) {
761761
this.virtualHost = "/";

spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/amqp/RabbitPropertiesTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public void determineVirtualHostReturnsPropertyWhenFirstAddressHasNoVirtualHost(
122122
}
123123

124124
@Test
125-
public void determinedVirtualHostIsSlashWhenAddressHasTrailingSlash() {
125+
public void determineVirtualHostIsSlashWhenAddressHasTrailingSlash() {
126126
this.properties.setAddresses("amqp://root:password@otherhost:1111/");
127127
assertThat(this.properties.determineVirtualHost()).isEqualTo("/");
128128
}
@@ -199,7 +199,7 @@ public void determinePasswordReturnsPropertyWhenFirstAddressHasNoPassword() {
199199

200200
@Test
201201
public void addressesDefaultsToNull() {
202-
assertThat(this.properties.getAddresses()).isEqualTo(null);
202+
assertThat(this.properties.getAddresses()).isNull();
203203
}
204204

205205
@Test

spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationObjectMapperProviderTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ public void responseIsSerializedUsingAutoConfiguredObjectMapper() {
6868
ResponseEntity<String> response = this.restTemplate.getForEntity("/rest/message",
6969
String.class);
7070
assertThat(HttpStatus.OK).isEqualTo(response.getStatusCode());
71-
assertThat(response.getBody())
72-
.isEqualTo(String.format("{\"subject\":\"Jersey\"}"));
71+
assertThat(response.getBody()).isEqualTo("{\"subject\":\"Jersey\"}");
7372
}
7473

7574
@MinimalWebConfiguration

spring-boot-docs/src/main/asciidoc/howto.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1415,7 +1415,7 @@ for example:
14151415
----
14161416

14171417
To avoid a warning message about the HTML 5 template mode being deprecated and the HTML
1418-
template mode being used instead, you may also want to explicity configure
1418+
template mode being used instead, you may also want to explicitly configure
14191419
`spring.thymeleaf.mode` to be `HTML`, for example:
14201420

14211421
[source,properties,indent=0,subs="verbatim,quotes,attributes"]

spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4059,7 +4059,7 @@ resolved against their provided names.
40594059
Apache Artemis was formed in 2015 when HornetQ was donated to the Apache Foundation. Make
40604060
sure to use that rather than the deprecated HornetQ support.
40614061

4062-
NOTE: You should not try and use Artemis and HornetQ and the same time.
4062+
NOTE: You should not try and use Artemis and HornetQ at the same time.
40634063

40644064
Spring Boot can auto-configure a `ConnectionFactory` when it detects that Artemis is
40654065
available on the classpath. If the broker is present, an embedded broker is started and

spring-boot-parent/src/checkstyle/checkstyle.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
<property name="maximum" value="0"/>
134134
<property name="format" value="org\.mockito\.Mockito\.(when|doThrow|doAnswer)" />
135135
<property name="message"
136-
value="Please use BDDMockto imports." />
136+
value="Please use BDDMockito imports." />
137137
<property name="ignoreComments" value="true" />
138138
</module>
139139
<module name="com.puppycrawl.tools.checkstyle.checks.regexp.RegexpSinglelineJavaCheck">

spring-boot/src/main/java/org/springframework/boot/system/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
*/
1616

1717
/**
18-
* General actuator system support classes.
18+
* General system support classes.
1919
*/
2020
package org.springframework.boot.system;

spring-boot/src/test/java/org/springframework/boot/bind/PropertySourcesPropertyValuesTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ public void testFirstCollectionPropertyWinsNestedAttributes() throws Exception {
237237
this.propertySources.addFirst(new MapPropertySource("s", second));
238238
this.propertySources.addFirst(new MapPropertySource("f", first));
239239
binder.bind(new PropertySourcesPropertyValues(this.propertySources));
240-
target.getList();
241240
assertThat(target.getList()).hasSize(1);
242241
assertThat(target.getList().get(0).getDescription())
243242
.isEqualTo("another description");

0 commit comments

Comments
 (0)