@@ -208,8 +208,6 @@ public static Builder create(final CSVFormat csvFormat) {
208208
209209 private boolean allowMissingColumnNames ;
210210
211- private boolean allowTrailingText ;
212-
213211 private boolean autoFlush ;
214212
215213 private Character commentMarker ;
@@ -266,7 +264,6 @@ private Builder(final CSVFormat csvFormat) {
266264 this .autoFlush = csvFormat .autoFlush ;
267265 this .quotedNullString = csvFormat .quotedNullString ;
268266 this .duplicateHeaderMode = csvFormat .duplicateHeaderMode ;
269- this .allowTrailingText = csvFormat .allowTrailingText ;
270267 }
271268
272269 /**
@@ -304,20 +301,6 @@ public Builder setAllowMissingColumnNames(final boolean allowMissingColumnNames)
304301 return this ;
305302 }
306303
307- /**
308- * Sets whether to allow trailing text in a quoted field, after the closing quote.
309- *
310- * @param allowTrailingText the trailing text behavior, {@code true} to append that text to the field contents, {@code false} to throw
311- * an {@link IOException}.
312- *
313- * @return This instance.
314- * @since 1.10.0
315- */
316- public Builder setAllowTrailingText (final boolean allowTrailingText ) {
317- this .allowTrailingText = allowTrailingText ;
318- return this ;
319- }
320-
321304 /**
322305 * Sets whether to flush on close.
323306 *
@@ -827,7 +810,7 @@ public CSVFormat getFormat() {
827810 * @see Predefined#Default
828811 */
829812 public static final CSVFormat DEFAULT = new CSVFormat (COMMA , DOUBLE_QUOTE_CHAR , null , null , null , false , true , CRLF , null , null , null , false , false , false ,
830- false , false , false , DuplicateHeaderMode .ALLOW_ALL , false );
813+ false , false , false , DuplicateHeaderMode .ALLOW_ALL );
831814
832815 /**
833816 * Excel file format (using a comma as the value delimiter). Note that the actual value delimiter used by Excel is locale dependent, it might be necessary
@@ -851,7 +834,6 @@ public CSVFormat getFormat() {
851834 * <li>{@code setIgnoreEmptyLines(false)}</li>
852835 * <li>{@code setAllowMissingColumnNames(true)}</li>
853836 * <li>{@code setDuplicateHeaderMode(DuplicateHeaderMode.ALLOW_ALL)}</li>
854- * <li>{@code setAllowTrailingText(true)}</li>
855837 * </ul>
856838 * <p>
857839 * Note: This is currently like {@link #RFC4180} plus {@link Builder#setAllowMissingColumnNames(boolean) Builder#setAllowMissingColumnNames(true)} and
@@ -864,7 +846,6 @@ public CSVFormat getFormat() {
864846 public static final CSVFormat EXCEL = DEFAULT .builder ()
865847 .setIgnoreEmptyLines (false )
866848 .setAllowMissingColumnNames (true )
867- .setAllowTrailingText (true )
868849 .build ();
869850 // @formatter:on
870851
@@ -1287,7 +1268,7 @@ private static boolean isTrimChar(final CharSequence charSequence, final int pos
12871268 */
12881269 public static CSVFormat newFormat (final char delimiter ) {
12891270 return new CSVFormat (String .valueOf (delimiter ), null , null , null , null , false , false , null , null , null , null , false , false , false , false , false , false ,
1290- DuplicateHeaderMode .ALLOW_ALL , false );
1271+ DuplicateHeaderMode .ALLOW_ALL );
12911272 }
12921273
12931274 static String [] toStringArray (final Object [] values ) {
@@ -1331,8 +1312,6 @@ public static CSVFormat valueOf(final String format) {
13311312
13321313 private final boolean allowMissingColumnNames ;
13331314
1334- private final boolean allowTrailingText ;
1335-
13361315 private final boolean autoFlush ;
13371316
13381317 private final Character commentMarker ; // null if commenting is disabled
@@ -1387,7 +1366,6 @@ private CSVFormat(final Builder builder) {
13871366 this .autoFlush = builder .autoFlush ;
13881367 this .quotedNullString = builder .quotedNullString ;
13891368 this .duplicateHeaderMode = builder .duplicateHeaderMode ;
1390- this .allowTrailingText = builder .allowTrailingText ;
13911369 validate ();
13921370 }
13931371
@@ -1418,7 +1396,7 @@ private CSVFormat(final String delimiter, final Character quoteChar, final Quote
14181396 final boolean ignoreSurroundingSpaces , final boolean ignoreEmptyLines , final String recordSeparator , final String nullString ,
14191397 final Object [] headerComments , final String [] header , final boolean skipHeaderRecord , final boolean allowMissingColumnNames ,
14201398 final boolean ignoreHeaderCase , final boolean trim , final boolean trailingDelimiter , final boolean autoFlush ,
1421- final DuplicateHeaderMode duplicateHeaderMode , final boolean allowTrailingText ) {
1399+ final DuplicateHeaderMode duplicateHeaderMode ) {
14221400 this .delimiter = delimiter ;
14231401 this .quoteCharacter = quoteChar ;
14241402 this .quoteMode = quoteMode ;
@@ -1438,7 +1416,6 @@ private CSVFormat(final String delimiter, final Character quoteChar, final Quote
14381416 this .autoFlush = autoFlush ;
14391417 this .quotedNullString = quoteCharacter + nullString + quoteCharacter ;
14401418 this .duplicateHeaderMode = duplicateHeaderMode ;
1441- this .allowTrailingText = allowTrailingText ;
14421419 validate ();
14431420 }
14441421
@@ -1492,8 +1469,7 @@ public boolean equals(final Object obj) {
14921469 ignoreHeaderCase == other .ignoreHeaderCase && ignoreSurroundingSpaces == other .ignoreSurroundingSpaces &&
14931470 Objects .equals (nullString , other .nullString ) && Objects .equals (quoteCharacter , other .quoteCharacter ) && quoteMode == other .quoteMode &&
14941471 Objects .equals (quotedNullString , other .quotedNullString ) && Objects .equals (recordSeparator , other .recordSeparator ) &&
1495- skipHeaderRecord == other .skipHeaderRecord && trailingDelimiter == other .trailingDelimiter && trim == other .trim &&
1496- allowTrailingText == other .allowTrailingText ;
1472+ skipHeaderRecord == other .skipHeaderRecord && trailingDelimiter == other .trailingDelimiter && trim == other .trim ;
14971473 }
14981474
14991475 /**
@@ -1536,16 +1512,6 @@ public boolean getAllowMissingColumnNames() {
15361512 return allowMissingColumnNames ;
15371513 }
15381514
1539- /**
1540- * Gets whether quoted fields allow trailing text after the closing quote.
1541- *
1542- * @return {@code true} if allowed, {@code false} to throw an {@link IOException}.
1543- * @since 1.10.0
1544- */
1545- public boolean getAllowTrailingText () {
1546- return allowTrailingText ;
1547- }
1548-
15491515 /**
15501516 * Gets whether to flush on close.
15511517 *
@@ -1726,9 +1692,9 @@ public int hashCode() {
17261692 int result = 1 ;
17271693 result = prime * result + Arrays .hashCode (headers );
17281694 result = prime * result + Arrays .hashCode (headerComments );
1729- return prime * result + Objects .hash (duplicateHeaderMode , allowMissingColumnNames , allowTrailingText , autoFlush , commentMarker , delimiter ,
1730- escapeCharacter , ignoreEmptyLines , ignoreHeaderCase , ignoreSurroundingSpaces , nullString , quoteCharacter , quoteMode , quotedNullString ,
1731- recordSeparator , skipHeaderRecord , trailingDelimiter , trim );
1695+ return prime * result + Objects .hash (duplicateHeaderMode , allowMissingColumnNames , autoFlush , commentMarker , delimiter , escapeCharacter ,
1696+ ignoreEmptyLines , ignoreHeaderCase , ignoreSurroundingSpaces , nullString , quoteCharacter , quoteMode , quotedNullString , recordSeparator ,
1697+ skipHeaderRecord , trailingDelimiter , trim );
17321698 }
17331699
17341700 /**
0 commit comments