mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:39:29 +00:00
Remove unnecessary invocations of toString()
Closes gh-36709 Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
This commit is contained in:
committed by
Sam Brannen
parent
c4dfb24116
commit
bfb88cfc1c
+1
-1
@@ -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 : "");
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -1146,7 +1146,7 @@ public abstract class RequestPredicates {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "!" + this.delegate.toString();
|
||||
return "!" + this.delegate;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user