This is an automated email from the ASF dual-hosted git repository.

garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-csv.git


The following commit(s) were added to refs/heads/master by this push:
     new 64ea660f Sort members
64ea660f is described below

commit 64ea660f8131d3257c2c312c8396fc5b9044a628
Author: Gary Gregory <[email protected]>
AuthorDate: Thu May 21 20:45:12 2026 -0400

    Sort members
---
 .../java/org/apache/commons/csv/CSVParser.java     | 32 +++++++++++-----------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/main/java/org/apache/commons/csv/CSVParser.java 
b/src/main/java/org/apache/commons/csv/CSVParser.java
index 5351f872..97c65a9b 100644
--- a/src/main/java/org/apache/commons/csv/CSVParser.java
+++ b/src/main/java/org/apache/commons/csv/CSVParser.java
@@ -473,6 +473,22 @@ public final class CSVParser implements 
Iterable<CSVRecord>, Closeable {
 
     private final Token reusableToken = new Token();
 
+    /**
+     * Constructs a new instance from a builder.
+     *
+     * @param builder The source builder.
+     * @throws IOException if an I/O error occurs.
+     */
+    @SuppressWarnings("resource") // Lexer manages ExtendedBufferedReader.
+    private CSVParser(final Builder builder) throws IOException {
+        this.format = (builder.format != null ? builder.format : 
CSVFormat.DEFAULT).copy();
+        this.lexer = new Lexer(format, new 
ExtendedBufferedReader(builder.getReader(), builder.getCharset(), 
builder.trackBytes));
+        this.csvRecordIterator = new CSVRecordIterator();
+        this.headers = createHeaders();
+        this.characterOffset = builder.characterOffset;
+        this.recordNumber = builder.recordNumber - 1;
+    }
+
     /**
      * Constructs a new instance using the given {@link CSVFormat}.
      *
@@ -533,22 +549,6 @@ public final class CSVParser implements 
Iterable<CSVRecord>, Closeable {
         // @formatter:off
     }
 
-    /**
-     * Constructs a new instance from a builder.
-     *
-     * @param builder The source builder.
-     * @throws IOException if an I/O error occurs.
-     */
-    @SuppressWarnings("resource") // Lexer manages ExtendedBufferedReader.
-    private CSVParser(final Builder builder) throws IOException {
-        this.format = (builder.format != null ? builder.format : 
CSVFormat.DEFAULT).copy();
-        this.lexer = new Lexer(format, new 
ExtendedBufferedReader(builder.getReader(), builder.getCharset(), 
builder.trackBytes));
-        this.csvRecordIterator = new CSVRecordIterator();
-        this.headers = createHeaders();
-        this.characterOffset = builder.characterOffset;
-        this.recordNumber = builder.recordNumber - 1;
-    }
-
     private void addRecordValue(final boolean lastRecord) {
         final String input = format.trim(reusableToken.content.toString());
         if (lastRecord && input.isEmpty() && format.getTrailingDelimiter()) {

Reply via email to