Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions src/main/java/org/apache/commons/csv/CSVParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ public static class Builder extends AbstractStreamBuilder<CSVParser, Builder> {
private CSVFormat format;
private long characterOffset;
private long recordNumber = 1;
private Charset charset;

/**
* Constructs a new instance.
Expand All @@ -165,7 +164,7 @@ protected Builder() {
@SuppressWarnings("resource")
@Override
public CSVParser get() throws IOException {
return new CSVParser(getReader(), format != null ? format : CSVFormat.DEFAULT, characterOffset, recordNumber, charset);
return new CSVParser(getReader(), format != null ? format : CSVFormat.DEFAULT, characterOffset, recordNumber, getCharset());
}

/**
Expand Down Expand Up @@ -201,16 +200,6 @@ public Builder setRecordNumber(final long recordNumber) {
return asThis();
}

/**
* Sets the character encoding to be used for the reader.
*
* @param charset the character encoding.
* @return this instance.
*/
public Builder setCharset(final Charset charset) {
this.charset = charset;
return asThis();
}
}

final class CSVRecordIterator implements Iterator<CSVRecord> {
Expand Down