Skip to content

Commit 4a34c35

Browse files
committed
Merge pull request #7120 from izeye:fix-string-format
* pr/7120: Fix String.format() usages
2 parents 20a2db7 + 1c4c0c6 commit 4a34c35

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/websocket/WebSocketMessagingAutoConfigurationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public void basicMessagingWithJsonResponse() throws Throwable {
106106
@Test
107107
public void basicMessagingWithStringResponse() throws Throwable {
108108
Object result = performStompSubscription("/app/string");
109-
assertThat(new String((byte[]) result)).isEqualTo(String.format("string data"));
109+
assertThat(new String((byte[]) result)).isEqualTo("string data");
110110
}
111111

112112
@Test

spring-boot/src/main/java/org/springframework/boot/bind/YamlConfigurationFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public void afterPropertiesSet() throws Exception {
138138
+ "either set it directly or set the resource to load it from");
139139
try {
140140
if (this.logger.isTraceEnabled()) {
141-
this.logger.trace(String.format("Yaml document is %n%s" + this.yaml));
141+
this.logger.trace(String.format("Yaml document is %n%s", this.yaml));
142142
}
143143
Constructor constructor = new YamlJavaBeanPropertyConstructor(this.type,
144144
this.propertyAliases);

0 commit comments

Comments
 (0)