Don't omit default cases

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1582814 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2014-03-28 16:38:26 +00:00
parent 1933f8abaf
commit 9873b13df2
2 changed files with 4 additions and 0 deletions

View File

@ -449,6 +449,8 @@ public final class CSVParser implements Iterable<CSVRecord>, Closeable {
sb.append(this.reusableToken.content); sb.append(this.reusableToken.content);
this.reusableToken.type = TOKEN; // Read another token this.reusableToken.type = TOKEN; // Read another token
break; break;
default:
throw new IllegalStateException("Unexpected Token type: " + this.reusableToken.type);
} }
} while (this.reusableToken.type == TOKEN); } while (this.reusableToken.type == TOKEN);

View File

@ -240,6 +240,8 @@ public final class CSVPrinter implements Flushable, Closeable {
return; return;
} }
break; break;
default:
throw new IllegalStateException("Unexpected Quote value: " + quotePolicy);
} }
if (!quote) { if (!quote) {