Skip to content

Polish #6671

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Polish #6671

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ public CachingConnectionFactory rabbitConnectionFactory(RabbitProperties config)
factory.setHost(config.determineHost());
}
factory.setPort(config.determinePort());
factory.setHost(config.determineHost());
if (config.determineUsername() != null) {
factory.setUsername(config.determineUsername());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ public String getVirtualHost() {
/**
* If addresses have been set and the first address has a virtual host it is returned.
* Otherwise returns the result of calling {@code getVirtualHost()}.
* @return the password or {@code null}
* @return the virtual host or {@code null}
* @see #setAddresses(String)
* @see #getVirtualHost()
*/
Expand Down Expand Up @@ -755,7 +755,7 @@ private String parseUsernameAndPassword(String input) {

private String parseVirtualHost(String input) {
int hostIndex = input.indexOf("/");
if (hostIndex >= 0 && hostIndex < input.length()) {
if (hostIndex >= 0) {
this.virtualHost = input.substring(hostIndex + 1);
if (this.virtualHost.length() == 0) {
this.virtualHost = "/";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public void determineVirtualHostReturnsPropertyWhenFirstAddressHasNoVirtualHost(
}

@Test
public void determinedVirtualHostIsSlashWhenAddressHasTrailingSlash() {
public void determineVirtualHostIsSlashWhenAddressHasTrailingSlash() {
this.properties.setAddresses("amqp://root:password@otherhost:1111/");
assertThat(this.properties.determineVirtualHost()).isEqualTo("/");
}
Expand Down Expand Up @@ -199,7 +199,7 @@ public void determinePasswordReturnsPropertyWhenFirstAddressHasNoPassword() {

@Test
public void addressesDefaultsToNull() {
assertThat(this.properties.getAddresses()).isEqualTo(null);
assertThat(this.properties.getAddresses()).isNull();
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ public void responseIsSerializedUsingAutoConfiguredObjectMapper() {
ResponseEntity<String> response = this.restTemplate.getForEntity("/rest/message",
String.class);
assertThat(HttpStatus.OK).isEqualTo(response.getStatusCode());
assertThat(response.getBody())
.isEqualTo(String.format("{\"subject\":\"Jersey\"}"));
assertThat(response.getBody()).isEqualTo("{\"subject\":\"Jersey\"}");
}

@MinimalWebConfiguration
Expand Down
2 changes: 1 addition & 1 deletion spring-boot-docs/src/main/asciidoc/howto.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1415,7 +1415,7 @@ for example:
----

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

[source,properties,indent=0,subs="verbatim,quotes,attributes"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4059,7 +4059,7 @@ resolved against their provided names.
Apache Artemis was formed in 2015 when HornetQ was donated to the Apache Foundation. Make
sure to use that rather than the deprecated HornetQ support.

NOTE: You should not try and use Artemis and HornetQ and the same time.
NOTE: You should not try and use Artemis and HornetQ at the same time.

Spring Boot can auto-configure a `ConnectionFactory` when it detects that Artemis is
available on the classpath. If the broker is present, an embedded broker is started and
Expand Down
2 changes: 1 addition & 1 deletion spring-boot-parent/src/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
<property name="maximum" value="0"/>
<property name="format" value="org\.mockito\.Mockito\.(when|doThrow|doAnswer)" />
<property name="message"
value="Please use BDDMockto imports." />
value="Please use BDDMockito imports." />
<property name="ignoreComments" value="true" />
</module>
<module name="com.puppycrawl.tools.checkstyle.checks.regexp.RegexpSinglelineJavaCheck">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
*/

/**
* General actuator system support classes.
* General system support classes.
*/
package org.springframework.boot.system;
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ public void testFirstCollectionPropertyWinsNestedAttributes() throws Exception {
this.propertySources.addFirst(new MapPropertySource("s", second));
this.propertySources.addFirst(new MapPropertySource("f", first));
binder.bind(new PropertySourcesPropertyValues(this.propertySources));
target.getList();
assertThat(target.getList()).hasSize(1);
assertThat(target.getList().get(0).getDescription())
.isEqualTo("another description");
Expand Down