From 15321a31633c7a9d0f838783640e7148472e4d9a Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Thu, 19 Dec 2019 13:06:53 +0000 Subject: [PATCH] Fix checkstyle violations --- .../org/springframework/http/ContentDispositionTests.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/spring-web/src/test/java/org/springframework/http/ContentDispositionTests.java b/spring-web/src/test/java/org/springframework/http/ContentDispositionTests.java index caf6e398e7..c14753ab84 100644 --- a/spring-web/src/test/java/org/springframework/http/ContentDispositionTests.java +++ b/spring-web/src/test/java/org/springframework/http/ContentDispositionTests.java @@ -107,11 +107,10 @@ public class ContentDispositionTests { @Test // gh-23077 public void parseWithEscapedQuote() { - BiConsumer tester = (description, filename) -> { + BiConsumer tester = (description, filename) -> assertThat(parse("form-data; name=\"file\"; filename=\"" + filename + "\"; size=123")) .as(description) .isEqualTo(builder("form-data").name("file").filename(filename).size(123L).build()); - }; tester.accept("Escaped quotes should be ignored", "\\\"The Twilight Zone\\\".txt"); @@ -223,10 +222,9 @@ public class ContentDispositionTests { @Test // gh-24220 public void formatWithFilenameWithQuotes() { - BiConsumer tester = (input, output) -> { + BiConsumer tester = (input, output) -> assertThat(builder("form-data").filename(input).build().toString()) .isEqualTo("form-data; filename=\"" + output + "\""); - }; String filename = "\"foo.txt"; tester.accept(filename, "\\" + filename);