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
  • Loading branch information
bschuhmann committed Nov 20, 2023
1 parent 668874e commit 6c69e6d
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 6c69e6d

Please sign in to comment.