Author: ggregory Date: Sat Oct 13 17:38:39 2012 New Revision: 1397909 URL: http://svn.apache.org/viewvc?rev=1397909&view=rev Log: Validation checks the delimiter character cannot be null.
Modified: commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java Modified: commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java?rev=1397909&r1=1397908&r2=1397909&view=diff ============================================================================== --- commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java (original) +++ commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java Sat Oct 13 17:38:39 2012 @@ -173,6 +173,10 @@ public class CSVFormat implements Serial * @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 + "')"); }