Skip to content

Commit

Permalink
[CSV-239] Cannot get headers in column order from CSVRecord.
Browse files Browse the repository at this point in the history
Undo previous change.
  • Loading branch information
Gary Gregory committed May 21, 2019
1 parent da55604 commit 4d2616b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/apache/commons/csv/CSVParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
Expand Down Expand Up @@ -441,7 +442,7 @@ public void close() throws IOException {
private Map<String, Integer> createEmptyHeaderMap() {
return this.format.getIgnoreHeaderCase() ?
new TreeMap<>(String.CASE_INSENSITIVE_ORDER) :
new TreeMap<>();
new LinkedHashMap<>();
}

/**
Expand Down

0 comments on commit 4d2616b

Please sign in to comment.