Skip to content

Commit 344f282

Browse files
authored
CSV-196: Remove duplicated Charset (#13)
1 parent 3599f5b commit 344f282

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

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

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ public static class Builder extends AbstractStreamBuilder<CSVParser, Builder> {
153153
private CSVFormat format;
154154
private long characterOffset;
155155
private long recordNumber = 1;
156-
private Charset charset;
157156

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

171170
/**
@@ -201,16 +200,6 @@ public Builder setRecordNumber(final long recordNumber) {
201200
return asThis();
202201
}
203202

204-
/**
205-
* Sets the character encoding to be used for the reader.
206-
*
207-
* @param charset the character encoding.
208-
* @return this instance.
209-
*/
210-
public Builder setCharset(final Charset charset) {
211-
this.charset = charset;
212-
return asThis();
213-
}
214203
}
215204

216205
final class CSVRecordIterator implements Iterator<CSVRecord> {

0 commit comments

Comments
 (0)