Skip to content

Commit 64ea660

Browse files
committed
Sort members
1 parent f11278e commit 64ea660

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

src/main/java/org/apache/commons/csv/CSVParser.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,22 @@ public static CSVParser parse(final URL url, final Charset charset, final CSVFor
473473

474474
private final Token reusableToken = new Token();
475475

476+
/**
477+
* Constructs a new instance from a builder.
478+
*
479+
* @param builder The source builder.
480+
* @throws IOException if an I/O error occurs.
481+
*/
482+
@SuppressWarnings("resource") // Lexer manages ExtendedBufferedReader.
483+
private CSVParser(final Builder builder) throws IOException {
484+
this.format = (builder.format != null ? builder.format : CSVFormat.DEFAULT).copy();
485+
this.lexer = new Lexer(format, new ExtendedBufferedReader(builder.getReader(), builder.getCharset(), builder.trackBytes));
486+
this.csvRecordIterator = new CSVRecordIterator();
487+
this.headers = createHeaders();
488+
this.characterOffset = builder.characterOffset;
489+
this.recordNumber = builder.recordNumber - 1;
490+
}
491+
476492
/**
477493
* Constructs a new instance using the given {@link CSVFormat}.
478494
*
@@ -533,22 +549,6 @@ public CSVParser(final Reader reader, final CSVFormat format, final long charact
533549
// @formatter:off
534550
}
535551

536-
/**
537-
* Constructs a new instance from a builder.
538-
*
539-
* @param builder The source builder.
540-
* @throws IOException if an I/O error occurs.
541-
*/
542-
@SuppressWarnings("resource") // Lexer manages ExtendedBufferedReader.
543-
private CSVParser(final Builder builder) throws IOException {
544-
this.format = (builder.format != null ? builder.format : CSVFormat.DEFAULT).copy();
545-
this.lexer = new Lexer(format, new ExtendedBufferedReader(builder.getReader(), builder.getCharset(), builder.trackBytes));
546-
this.csvRecordIterator = new CSVRecordIterator();
547-
this.headers = createHeaders();
548-
this.characterOffset = builder.characterOffset;
549-
this.recordNumber = builder.recordNumber - 1;
550-
}
551-
552552
private void addRecordValue(final boolean lastRecord) {
553553
final String input = format.trim(reusableToken.content.toString());
554554
if (lastRecord && input.isEmpty() && format.getTrailingDelimiter()) {

0 commit comments

Comments
 (0)