Format lines that are longer than 120 characters

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1458794 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benedikt Ritter 2013-03-20 12:39:18 +00:00
parent 62a527636d
commit 961cce294c
1 changed files with 10 additions and 7 deletions

View File

@ -580,25 +580,28 @@ public class CSVFormat implements Serializable {
*/
private void validate() throws IllegalStateException {
if (quoteChar != null && delimiter == quoteChar.charValue()) {
throw new IllegalStateException("The quoteChar character and the delimiter cannot be the same ('" + quoteChar + "')");
throw new IllegalStateException(
"The quoteChar character and the delimiter cannot be the same ('" + quoteChar + "')");
}
if (escape != null && delimiter == escape.charValue()) {
throw new IllegalStateException("The escape character and the delimiter cannot be the same ('" + escape + "')");
throw new IllegalStateException(
"The escape character and the delimiter cannot be the same ('" + escape + "')");
}
if (commentStart != null && delimiter == commentStart.charValue()) {
throw new IllegalStateException("The comment start character and the delimiter cannot be the same ('" + commentStart +
"')");
throw new IllegalStateException(
"The comment start character and the delimiter cannot be the same ('" + commentStart + "')");
}
if (quoteChar != null && quoteChar.equals(commentStart)) {
throw new IllegalStateException("The comment start character and the quoteChar cannot be the same ('" + commentStart +
"')");
throw new IllegalStateException(
"The comment start character and the quoteChar cannot be the same ('" + commentStart + "')");
}
if (escape != null && escape.equals(commentStart)) {
throw new IllegalStateException("The comment start and the escape character cannot be the same ('" + commentStart + "')");
throw new IllegalStateException(
"The comment start and the escape character cannot be the same ('" + commentStart + "')");
}
if (escape == null && quotePolicy == Quote.NONE) {