Skip to content

Commit 9873b13

Browse files
committed
Don't omit default cases
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1582814 13f79535-47bb-0310-9956-ffa450edef68
1 parent 1933f8a commit 9873b13

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/main/java/org/apache/commons/csv/CSVParser.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,8 @@ CSVRecord nextRecord() throws IOException {
449449
sb.append(this.reusableToken.content);
450450
this.reusableToken.type = TOKEN; // Read another token
451451
break;
452+
default:
453+
throw new IllegalStateException("Unexpected Token type: " + this.reusableToken.type);
452454
}
453455
} while (this.reusableToken.type == TOKEN);
454456

src/main/java/org/apache/commons/csv/CSVPrinter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,8 @@ private void printAndQuote(final Object object, final CharSequence value,
240240
return;
241241
}
242242
break;
243+
default:
244+
throw new IllegalStateException("Unexpected Quote value: " + quotePolicy);
243245
}
244246

245247
if (!quote) {

0 commit comments

Comments
 (0)