Skip to content

Commit

Permalink
Use LinkedHashMap for parts map to ensure user input order
Browse files Browse the repository at this point in the history
(cherry picked from commit 6c69e6d)
  • Loading branch information
bschuhmann authored and gsmet committed Nov 20, 2023
1 parent ef18b91 commit 85dcd00
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.jboss.resteasy.reactive.server.multipart;

import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

import jakarta.ws.rs.core.MediaType;
Expand All @@ -10,7 +10,7 @@
* Used when a Resource method needs to return a multipart output
*/
public final class MultipartFormDataOutput {
private final Map<String, PartItem> parts = new HashMap<>();
private final Map<String, PartItem> parts = new LinkedHashMap<>();

public Map<String, PartItem> getFormData() {
return Collections.unmodifiableMap(parts);
Expand Down

0 comments on commit 85dcd00

Please sign in to comment.