mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-21 05:09:13 +00:00
Minor refactoring in MultipartParser
Move the nested InternalParser class up, merging it with the top-level MultipartParser, make the constructor private, and expose a static parse method.
This commit is contained in:
+1
-2
@@ -189,8 +189,7 @@ class MultipartParserTests {
|
||||
|
||||
private void parse(String fileName, String boundary, MultipartParser.PartListener listener) throws Exception {
|
||||
try (InputStream input = createStream(fileName)) {
|
||||
MultipartParser multipartParser = new MultipartParser(10 * 1024, 4 * 1024);
|
||||
multipartParser.parse(input, boundary.getBytes(UTF_8), StandardCharsets.UTF_8, listener);
|
||||
MultipartParser.parse(input, boundary.getBytes(UTF_8), UTF_8, 10 * 1024, 4 * 1024, listener);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user