Skip to content

Commit e85f445

Browse files
committed
Deprecate CSVParser constructors
1 parent e991e6d commit e85f445

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/changes/changes.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<!-- FIX -->
4545
<!-- ADD -->
4646
<action type="add" issue="CSV-313" dev="ggregory" due-to="Gary Gregory">Add CSVPrinter.getRecordCount().</action>
47-
<action type="add" dev="ggregory" due-to="Gary Gregory">Add and use CSVParser.Builder and builder().</action>
47+
<action type="add" dev="ggregory" due-to="Gary Gregory">Add and use CSVParser.Builder and builder() and deprecate CSVParser constructors.</action>
4848
<!-- UPDATE -->
4949
<action type="update" dev="ggregory" due-to="Gary Gregory, Dependabot">Bump org.apache.commons:commons-parent from 76 to 78 #486, #495.</action>
5050
<action type="update" dev="ggregory" due-to="Gary Gregory, Dependabot">Bump org.codehaus.mojo:taglist-maven-plugin from 3.1.0 to 3.2.1 #493.</action>

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,9 @@ public static CSVParser parse(final URL url, final Charset charset, final CSVFor
476476
* @throws IOException
477477
* If there is a problem reading the header or skipping the first record
478478
* @throws CSVException Thrown on invalid input.
479+
* @deprecated Will be removed in the next major version, use {@link Builder#get()}.
479480
*/
481+
@Deprecated
480482
public CSVParser(final Reader reader, final CSVFormat format) throws IOException {
481483
this(reader, format, 0, 1);
482484
}
@@ -503,7 +505,9 @@ public CSVParser(final Reader reader, final CSVFormat format) throws IOException
503505
* If there is a problem reading the header or skipping the first record
504506
* @throws CSVException Thrown on invalid input.
505507
* @since 1.1
508+
* @deprecated Will be private in the next major version, use {@link Builder#get()}.
506509
*/
510+
@Deprecated
507511
@SuppressWarnings("resource")
508512
public CSVParser(final Reader reader, final CSVFormat format, final long characterOffset, final long recordNumber)
509513
throws IOException {

0 commit comments

Comments
 (0)