Skip to content
This repository was archived by the owner on Jun 3, 2026. It is now read-only.

Commit f342cb2

Browse files
committed
Validation checks the delimiter character cannot be null.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1397909 13f79535-47bb-0310-9956-ffa450edef68
1 parent 0e7e9de commit f342cb2

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ private static boolean isLineBreak(final Character c) {
173173
* @throws IllegalStateException
174174
*/
175175
void validate() throws IllegalStateException {
176+
if (delimiter == null) {
177+
throw new IllegalStateException("The delimiter character cannot be null");
178+
}
179+
176180
if (delimiter == encapsulator) {
177181
throw new IllegalStateException("The encapsulator character and the delimiter cannot be the same ('" + encapsulator + "')");
178182
}

0 commit comments

Comments
 (0)