From 7fe9933067a7e256e9a831ecba6a8498796a70d5 Mon Sep 17 00:00:00 2001 From: sergiparpal Date: Sat, 28 Nov 2026 16:15:27 +0100 Subject: [PATCH] [javadoc] Remove stale @throws from CSVFormat.withRecordSeparator(String) The Javadoc says the method throws IllegalArgumentException if the record separator is none of CR, LF or CRLF. CSVFormat has no such check: 43560d92 added one to validate() in July 2014, and bb54feb7 removed it four days later together with the @throws of withRecordSeparator(char), but left this one. The method accepts any string, like Builder.setRecordSeparator(String), whose Javadoc has no @throws. Co-Authored-By: Claude Opus 5.5 --- src/main/java/org/apache/commons/csv/CSVFormat.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/org/apache/commons/csv/CSVFormat.java b/src/main/java/org/apache/commons/csv/CSVFormat.java index cc3192a02..0781824f3 100644 --- a/src/main/java/org/apache/commons/csv/CSVFormat.java +++ b/src/main/java/org/apache/commons/csv/CSVFormat.java @@ -3263,7 +3263,6 @@ public CSVFormat withRecordSeparator(final char recordSeparator) { * * @param recordSeparator The record separator to use for output. * @return A new CSVFormat that is equal to this but with the specified output record separator - * @throws IllegalArgumentException if recordSeparator is none of CR, LF or CRLF * @deprecated Use {@link Builder#setRecordSeparator(String)} */ @Deprecated