Merge pull request #7120 from izeye:fix-string-format

* pr/7120:
  Fix String.format() usages
This commit is contained in:
Stephane Nicoll 2016-10-07 09:46:03 +02:00
commit 4a34c35da3
2 changed files with 2 additions and 2 deletions

View File

@ -106,7 +106,7 @@ public class WebSocketMessagingAutoConfigurationTests {
@Test @Test
public void basicMessagingWithStringResponse() throws Throwable { public void basicMessagingWithStringResponse() throws Throwable {
Object result = performStompSubscription("/app/string"); Object result = performStompSubscription("/app/string");
assertThat(new String((byte[]) result)).isEqualTo(String.format("string data")); assertThat(new String((byte[]) result)).isEqualTo("string data");
} }
@Test @Test

View File

@ -138,7 +138,7 @@ public class YamlConfigurationFactory<T>
+ "either set it directly or set the resource to load it from"); + "either set it directly or set the resource to load it from");
try { try {
if (this.logger.isTraceEnabled()) { if (this.logger.isTraceEnabled()) {
this.logger.trace(String.format("Yaml document is %n%s" + this.yaml)); this.logger.trace(String.format("Yaml document is %n%s", this.yaml));
} }
Constructor constructor = new YamlJavaBeanPropertyConstructor(this.type, Constructor constructor = new YamlJavaBeanPropertyConstructor(this.type,
this.propertyAliases); this.propertyAliases);