File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
src/protocol/http/src/main/java/org/apache/http/entity/mime Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -223,17 +223,11 @@ MultipartFormEntity buildEntity() {
223223 final List <FormBodyPart > bodyPartsCopy = bodyParts != null ? new ArrayList <>(bodyParts ) :
224224 Collections .emptyList ();
225225 final HttpMultipartMode modeCopy = mode != null ? mode : HttpMultipartMode .STRICT ;
226- final AbstractMultipartForm form ;
227- switch (modeCopy ) {
228- case BROWSER_COMPATIBLE :
229- form = new HttpBrowserCompatibleMultipart (charsetCopy , boundaryCopy , bodyPartsCopy );
230- break ;
231- case RFC6532 :
232- form = new HttpRFC6532Multipart (charsetCopy , boundaryCopy , bodyPartsCopy );
233- break ;
234- default :
235- form = new HttpStrictMultipart (charsetCopy , boundaryCopy , bodyPartsCopy );
236- }
226+ final AbstractMultipartForm form = switch (modeCopy ) {
227+ case BROWSER_COMPATIBLE -> new HttpBrowserCompatibleMultipart (charsetCopy , boundaryCopy , bodyPartsCopy );
228+ case RFC6532 -> new HttpRFC6532Multipart (charsetCopy , boundaryCopy , bodyPartsCopy );
229+ default -> new HttpStrictMultipart (charsetCopy , boundaryCopy , bodyPartsCopy );
230+ };
237231 return new MultipartFormEntity (form , contentTypeCopy , form .getTotalLength ());
238232 }
239233
You can’t perform that action at this time.
0 commit comments