Skip to content

Commit dbdf96b

Browse files
committed
Javadoc
- Add missing @throws tags
1 parent f1bf8cd commit dbdf96b

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

src/changes/changes.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
<action type="fix" dev="ggregory" due-to="Gary Gregory, Naveed Khan">Handle null name in CSVRecord accessors under ignoreHeaderCase (#628).</action>
7474
<action type="fix" dev="ggregory" due-to="Gary Gregory, Naveed Khan">Quote null value that starts a record in minimal quote mode (#629).</action>
7575
<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>
76+
<action type="fix" dev="ggregory" due-to="Gary Gregory">General Javadoc improvements.</action>
7677
<!-- ADD -->
7778
<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>
7879
<action type="add" dev="ggregory" due-to="Ruiqi Dong, Gary Gregory" issue="CSV-325">Add CSVParser.Builder.setByteOffset(long) (#604).</action>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ public Builder setCommentMarker(final Character commentMarker) {
450450
*
451451
* @param delimiter The delimiter character.
452452
* @return This instance.
453+
* @throws IllegalArgumentException if the delimiter is a line break.
453454
*/
454455
public Builder setDelimiter(final char delimiter) {
455456
return setDelimiter(String.valueOf(delimiter));
@@ -460,6 +461,7 @@ public Builder setDelimiter(final char delimiter) {
460461
*
461462
* @param delimiter The delimiter character.
462463
* @return This instance.
464+
* @throws IllegalArgumentException if the delimiter is a line break or is empty.
463465
*/
464466
public Builder setDelimiter(final String delimiter) {
465467
if (containsLineBreak(delimiter)) {
@@ -477,6 +479,7 @@ public Builder setDelimiter(final String delimiter) {
477479
*
478480
* @param duplicateHeaderMode The duplicate header names behavior
479481
* @return This instance.
482+
* @throws NullPointerException if duplicateHeaderMode is null.
480483
* @since 1.10.0
481484
*/
482485
public Builder setDuplicateHeaderMode(final DuplicateHeaderMode duplicateHeaderMode) {

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ public final class CSVRecord implements Serializable, Iterable<String> {
8383
* @param e
8484
* an enum
8585
* @return The String at the given enum String
86+
* @throws IllegalStateException
87+
* if no header mapping was provided.
88+
* @throws IllegalArgumentException
89+
* if the enum name is not mapped or if the record is inconsistent.
8690
*/
8791
public String get(final Enum<?> e) {
8892
return get(e == null ? null : e.name());
@@ -94,6 +98,7 @@ public String get(final Enum<?> e) {
9498
* @param i
9599
* a column index (0-based)
96100
* @return The String at the given index
101+
* @throws ArrayIndexOutOfBoundsException if the index is out of bounds.
97102
*/
98103
public String get(final int i) {
99104
return values[i];

0 commit comments

Comments
 (0)