@@ -51,19 +51,19 @@ private static CSVFormat copy(final CSVFormat format) {
5151 return format .withDelimiter (format .getDelimiter ());
5252 }
5353
54- @ Test (expected = IllegalStateException .class )
54+ @ Test (expected = IllegalArgumentException .class )
5555 public void testDelimiterSameAsCommentStartThrowsException () {
56- CSVFormat .DEFAULT .withDelimiter ('!' ).withCommentStart ('!' ). validate () ;
56+ CSVFormat .DEFAULT .withDelimiter ('!' ).withCommentStart ('!' );
5757 }
5858
59- @ Test (expected = IllegalStateException .class )
59+ @ Test (expected = IllegalArgumentException .class )
6060 public void testDelimiterSameAsEscapeThrowsException () {
61- CSVFormat .DEFAULT .withDelimiter ('!' ).withEscape ('!' ). validate () ;
61+ CSVFormat .DEFAULT .withDelimiter ('!' ).withEscape ('!' );
6262 }
6363
6464 @ Test (expected = IllegalArgumentException .class )
6565 public void testDuplicateHeaderElements () {
66- CSVFormat .DEFAULT .withHeader ("A" , "A" ). validate () ;
66+ CSVFormat .DEFAULT .withHeader ("A" , "A" );
6767 }
6868
6969 @ Test
@@ -231,15 +231,15 @@ public void testEqualsSkipHeaderRecord() {
231231 assertNotEquals (right , left );
232232 }
233233
234- @ Test (expected = IllegalStateException .class )
234+ @ Test (expected = IllegalArgumentException .class )
235235 public void testEscapeSameAsCommentStartThrowsException () {
236- CSVFormat .DEFAULT .withEscape ('!' ).withCommentStart ('!' ). validate () ;
236+ CSVFormat .DEFAULT .withEscape ('!' ).withCommentStart ('!' );
237237 }
238238
239- @ Test (expected = IllegalStateException .class )
239+ @ Test (expected = IllegalArgumentException .class )
240240 public void testEscapeSameAsCommentStartThrowsExceptionForWrapperType () {
241241 // Cannot assume that callers won't use different Character objects
242- CSVFormat .DEFAULT .withEscape (new Character ('!' )).withCommentStart (new Character ('!' )). validate () ;
242+ CSVFormat .DEFAULT .withEscape (new Character ('!' )).withCommentStart (new Character ('!' ));
243243 }
244244
245245 @ Test
@@ -272,25 +272,25 @@ public void testNullRecordSeparatorCsv106() {
272272 assertFalse (formatStr .endsWith ("null" ));
273273 }
274274
275- @ Test (expected = IllegalStateException .class )
275+ @ Test (expected = IllegalArgumentException .class )
276276 public void testQuoteCharSameAsCommentStartThrowsException () {
277- CSVFormat .DEFAULT .withQuoteChar ('!' ).withCommentStart ('!' ). validate () ;
277+ CSVFormat .DEFAULT .withQuoteChar ('!' ).withCommentStart ('!' );
278278 }
279279
280- @ Test (expected = IllegalStateException .class )
280+ @ Test (expected = IllegalArgumentException .class )
281281 public void testQuoteCharSameAsCommentStartThrowsExceptionForWrapperType () {
282282 // Cannot assume that callers won't use different Character objects
283- CSVFormat .DEFAULT .withQuoteChar (new Character ('!' )).withCommentStart ('!' ). validate () ;
283+ CSVFormat .DEFAULT .withQuoteChar (new Character ('!' )).withCommentStart ('!' );
284284 }
285285
286- @ Test (expected = IllegalStateException .class )
286+ @ Test // (expected = IllegalArgumentException .class)
287287 public void testQuoteCharSameAsDelimiterThrowsException () {
288- CSVFormat .DEFAULT .withQuoteChar ('!' ).withDelimiter ('!' ). validate () ;
288+ CSVFormat .DEFAULT .withQuoteChar ('!' ).withDelimiter ('!' );
289289 }
290290
291- @ Test (expected = IllegalStateException .class )
291+ @ Test (expected = IllegalArgumentException .class )
292292 public void testQuotePolicyNoneWithoutEscapeThrowsException () {
293- CSVFormat .newFormat ('!' ).withQuotePolicy (Quote .NONE ). validate () ;
293+ CSVFormat .newFormat ('!' ).withQuotePolicy (Quote .NONE );
294294 }
295295
296296 @ Test
@@ -335,7 +335,7 @@ public void testWithCommentStart() throws Exception {
335335
336336 @ Test (expected = IllegalArgumentException .class )
337337 public void testWithCommentStartCRThrowsException () {
338- CSVFormat .DEFAULT .withCommentStart (CR ). validate () ;
338+ CSVFormat .DEFAULT .withCommentStart (CR );
339339 }
340340
341341 @ Test
@@ -346,7 +346,7 @@ public void testWithDelimiter() throws Exception {
346346
347347 @ Test (expected = IllegalArgumentException .class )
348348 public void testWithDelimiterLFThrowsException () {
349- CSVFormat .DEFAULT .withDelimiter (LF ). validate () ;
349+ CSVFormat .DEFAULT .withDelimiter (LF );
350350 }
351351
352352 @ Test
@@ -357,7 +357,7 @@ public void testWithEscape() throws Exception {
357357
358358 @ Test (expected = IllegalArgumentException .class )
359359 public void testWithEscapeCRThrowsExceptions () {
360- CSVFormat .DEFAULT .withEscape (CR ). validate () ;
360+ CSVFormat .DEFAULT .withEscape (CR );
361361 }
362362
363363 @ Test
@@ -399,7 +399,7 @@ public void testWithQuoteChar() throws Exception {
399399
400400 @ Test (expected = IllegalArgumentException .class )
401401 public void testWithQuoteLFThrowsException () {
402- CSVFormat .DEFAULT .withQuoteChar (LF ). validate () ;
402+ CSVFormat .DEFAULT .withQuoteChar (LF );
403403 }
404404
405405 @ Test
0 commit comments