This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-csv.git
The following commit(s) were added to refs/heads/master by this push:
new dbdf96b7 Javadoc
dbdf96b7 is described below
commit dbdf96b705c47d7d1966dcc385208492ce128700
Author: Gary Gregory <[email protected]>
AuthorDate: Wed Aug 5 15:21:59 2026 -0400
Javadoc
- Add missing @throws tags
---
src/changes/changes.xml | 1 +
src/main/java/org/apache/commons/csv/CSVFormat.java | 3 +++
src/main/java/org/apache/commons/csv/CSVRecord.java | 5 +++++
3 files changed, 9 insertions(+)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index efaa89b3..2236f6a1 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -73,6 +73,7 @@
<action type="fix" dev="ggregory" due-to="Gary Gregory, Naveed
Khan">Handle null name in CSVRecord accessors under ignoreHeaderCase
(#628).</action>
<action type="fix" dev="ggregory" due-to="Gary Gregory, Naveed
Khan">Quote null value that starts a record in minimal quote mode
(#629).</action>
<action type="fix" dev="ggregory" due-to="Gary Gregory, Naveed
Khan">Close the stream parse(Path) and parse(URL) open on construction failure
(#630).</action>
+ <action type="fix" dev="ggregory" due-to="Gary Gregory">General Javadoc
improvements.</action>
<!-- ADD -->
<action type="add" dev="ggregory" due-to="Gary Gregory, Indy, Sylvia van
Os" issue="CSV-307">Add an "Android Compatibility" section to the web
site.</action>
<action type="add" dev="ggregory" due-to="Ruiqi Dong, Gary Gregory"
issue="CSV-325">Add CSVParser.Builder.setByteOffset(long) (#604).</action>
diff --git a/src/main/java/org/apache/commons/csv/CSVFormat.java
b/src/main/java/org/apache/commons/csv/CSVFormat.java
index 4d8ca964..2e7e12a7 100644
--- a/src/main/java/org/apache/commons/csv/CSVFormat.java
+++ b/src/main/java/org/apache/commons/csv/CSVFormat.java
@@ -450,6 +450,7 @@ public final class CSVFormat implements Serializable {
*
* @param delimiter The delimiter character.
* @return This instance.
+ * @throws IllegalArgumentException if the delimiter is a line break.
*/
public Builder setDelimiter(final char delimiter) {
return setDelimiter(String.valueOf(delimiter));
@@ -460,6 +461,7 @@ public final class CSVFormat implements Serializable {
*
* @param delimiter The delimiter character.
* @return This instance.
+ * @throws IllegalArgumentException if the delimiter is a line break
or is empty.
*/
public Builder setDelimiter(final String delimiter) {
if (containsLineBreak(delimiter)) {
@@ -477,6 +479,7 @@ public final class CSVFormat implements Serializable {
*
* @param duplicateHeaderMode The duplicate header names behavior
* @return This instance.
+ * @throws NullPointerException if duplicateHeaderMode is null.
* @since 1.10.0
*/
public Builder setDuplicateHeaderMode(final DuplicateHeaderMode
duplicateHeaderMode) {
diff --git a/src/main/java/org/apache/commons/csv/CSVRecord.java
b/src/main/java/org/apache/commons/csv/CSVRecord.java
index a3115e32..9e807137 100644
--- a/src/main/java/org/apache/commons/csv/CSVRecord.java
+++ b/src/main/java/org/apache/commons/csv/CSVRecord.java
@@ -83,6 +83,10 @@ public final class CSVRecord implements Serializable,
Iterable<String> {
* @param e
* an enum
* @return The String at the given enum String
+ * @throws IllegalStateException
+ * if no header mapping was provided.
+ * @throws IllegalArgumentException
+ * if the enum name is not mapped or if the record is
inconsistent.
*/
public String get(final Enum<?> e) {
return get(e == null ? null : e.name());
@@ -94,6 +98,7 @@ public final class CSVRecord implements Serializable,
Iterable<String> {
* @param i
* a column index (0-based)
* @return The String at the given index
+ * @throws ArrayIndexOutOfBoundsException if the index is out of bounds.
*/
public String get(final int i) {
return values[i];