Remove unnecessary calls to toString()

See gh-29408
This commit is contained in:
Kulwant Singh 2022-10-31 22:53:56 +01:00 committed by Sam Brannen
parent bd57d860d2
commit 19955c5b77
3 changed files with 4 additions and 4 deletions

View File

@ -89,7 +89,7 @@ public class SessionDisconnectEvent extends AbstractSubProtocolEvent {
@Override
public String toString() {
return "SessionDisconnectEvent[sessionId=" + this.sessionId + ", " + this.status.toString() + "]";
return "SessionDisconnectEvent[sessionId=" + this.sessionId + ", " + this.status + "]";
}
}

View File

@ -244,7 +244,7 @@ public class ConvertingEncoderDecoderSupportTests {
private static class MyTypeToStringConverter implements Converter<MyType, String> {
@Override
public String convert(MyType source) {
return "_" + source.toString();
return "_" + source;
}
}
@ -252,7 +252,7 @@ public class ConvertingEncoderDecoderSupportTests {
private static class MyTypeToBytesConverter implements Converter<MyType, byte[]> {
@Override
public byte[] convert(MyType source) {
return ("~" + source.toString()).getBytes();
return ("~" + source).getBytes();
}
}

View File

@ -91,7 +91,7 @@ public class RestTemplateXhrTransportTests {
for (int i = 0; i < 2048; i++) {
sb.append('h');
}
String body = sb.toString() + "\n" + "o\n" + "a[\"foo\"]\n" + "c[3000,\"Go away!\"]";
String body = sb + "\n" + "o\n" + "a[\"foo\"]\n" + "c[3000,\"Go away!\"]";
ClientHttpResponse response = response(HttpStatus.OK, body);
connect(response);