diff --git a/src/main/java/org/apache/commons/csv/CSVFormat.java b/src/main/java/org/apache/commons/csv/CSVFormat.java index 987d63d5..f48278e0 100644 --- a/src/main/java/org/apache/commons/csv/CSVFormat.java +++ b/src/main/java/org/apache/commons/csv/CSVFormat.java @@ -173,6 +173,10 @@ public class CSVFormat implements Serializable { * @throws IllegalStateException */ void validate() throws IllegalStateException { + if (delimiter == null) { + throw new IllegalStateException("The delimiter character cannot be null"); + } + if (delimiter == encapsulator) { throw new IllegalStateException("The encapsulator character and the delimiter cannot be the same ('" + encapsulator + "')"); }