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
This commit is contained in:
parent
0e7e9deabb
commit
f342cb2caf
|
@ -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 + "')");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue