Remove unnecessary invocations of toString()

Closes gh-36709

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
This commit is contained in:
Yanming Zhou
2026-04-27 11:27:29 +03:00
committed by Sam Brannen
parent c4dfb24116
commit bfb88cfc1c
19 changed files with 23 additions and 23 deletions
@@ -73,7 +73,7 @@ public class UnsupportedMediaTypeException extends NestedRuntimeException {
private static String initReason(@Nullable MediaType contentType, @Nullable ResolvableType bodyType) {
return "Content type '" + (contentType != null ? contentType : "") + "' not supported" +
(bodyType != null ? " for bodyType=" + bodyType.toString() : "");
(bodyType != null ? " for bodyType=" + bodyType : "");
}
@@ -1146,7 +1146,7 @@ public abstract class RequestPredicates {
@Override
public String toString() {
return "!" + this.delegate.toString();
return "!" + this.delegate;
}
}
@@ -286,7 +286,7 @@ class MultipartWebClientIntegrationTests extends AbstractHttpHandlerIntegrationT
Flux<String> transferTo(@RequestPart("fileParts") Flux<FilePart> parts) {
return parts.concatMap(filePart -> createTempFile(filePart.filename())
.flatMap(tempFile -> filePart.transferTo(tempFile)
.then(Mono.just(tempFile.toString() + "\n"))));
.then(Mono.just(tempFile + "\n"))));
}
private Mono<Path> createTempFile(String suffix) {