This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-csv.git
commit e85f4455fdd3a828a977b6706aa98c58b6ce10e3 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Fri Nov 1 10:58:00 2024 -0400 Deprecate CSVParser constructors --- src/changes/changes.xml | 2 +- src/main/java/org/apache/commons/csv/CSVParser.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 09b60e51..ab5d7d66 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -44,7 +44,7 @@ <!-- FIX --> <!-- ADD --> <action type="add" issue="CSV-313" dev="ggregory" due-to="Gary Gregory">Add CSVPrinter.getRecordCount().</action> - <action type="add" dev="ggregory" due-to="Gary Gregory">Add and use CSVParser.Builder and builder().</action> + <action type="add" dev="ggregory" due-to="Gary Gregory">Add and use CSVParser.Builder and builder() and deprecate CSVParser constructors.</action> <!-- UPDATE --> <action type="update" dev="ggregory" due-to="Gary Gregory, Dependabot">Bump org.apache.commons:commons-parent from 76 to 78 #486, #495.</action> <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> diff --git a/src/main/java/org/apache/commons/csv/CSVParser.java b/src/main/java/org/apache/commons/csv/CSVParser.java index 14e2a778..f0341cf7 100644 --- a/src/main/java/org/apache/commons/csv/CSVParser.java +++ b/src/main/java/org/apache/commons/csv/CSVParser.java @@ -476,7 +476,9 @@ public final class CSVParser implements Iterable<CSVRecord>, Closeable { * @throws IOException * If there is a problem reading the header or skipping the first record * @throws CSVException Thrown on invalid input. + * @deprecated Will be removed in the next major version, use {@link Builder#get()}. */ + @Deprecated public CSVParser(final Reader reader, final CSVFormat format) throws IOException { this(reader, format, 0, 1); } @@ -503,7 +505,9 @@ public final class CSVParser implements Iterable<CSVRecord>, Closeable { * If there is a problem reading the header or skipping the first record * @throws CSVException Thrown on invalid input. * @since 1.1 + * @deprecated Will be private in the next major version, use {@link Builder#get()}. */ + @Deprecated @SuppressWarnings("resource") public CSVParser(final Reader reader, final CSVFormat format, final long characterOffset, final long recordNumber) throws IOException {