Fix checkstyle violations

This commit is contained in:
Rossen Stoyanchev 2019-12-19 13:06:53 +00:00
parent 41f40c6c22
commit 15321a3163
1 changed files with 2 additions and 4 deletions

View File

@ -107,11 +107,10 @@ public class ContentDispositionTests {
@Test // gh-23077
public void parseWithEscapedQuote() {
BiConsumer<String, String> tester = (description, filename) -> {
BiConsumer<String, String> 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<String, String> tester = (input, output) -> {
BiConsumer<String, String> tester = (input, output) ->
assertThat(builder("form-data").filename(input).build().toString())
.isEqualTo("form-data; filename=\"" + output + "\"");
};
String filename = "\"foo.txt";
tester.accept(filename, "\\" + filename);