@@ -155,8 +155,8 @@ public class CSVFormat implements Serializable {
155155 * @param header
156156 * the header
157157 */
158- CSVFormat (char delimiter , char encapsulator , char commentStart , char escape , boolean surroundingSpacesIgnored ,
159- boolean emptyLinesIgnored , String lineSeparator , String [] header ) {
158+ CSVFormat (final char delimiter , final char encapsulator , final char commentStart , final char escape , final boolean surroundingSpacesIgnored ,
159+ final boolean emptyLinesIgnored , final String lineSeparator , final String [] header ) {
160160 this .delimiter = delimiter ;
161161 this .encapsulator = encapsulator ;
162162 this .commentStart = commentStart ;
@@ -178,7 +178,7 @@ public class CSVFormat implements Serializable {
178178 *
179179 * @return true if <code>c</code> is a line break character
180180 */
181- private static boolean isLineBreak (char c ) {
181+ private static boolean isLineBreak (final char c ) {
182182 return c == '\n' || c == '\r' ;
183183 }
184184
@@ -230,7 +230,7 @@ public char getDelimiter() {
230230 * @throws IllegalArgumentException
231231 * thrown if the specified character is a line break
232232 */
233- public CSVFormat withDelimiter (char delimiter ) {
233+ public CSVFormat withDelimiter (final char delimiter ) {
234234 if (isLineBreak (delimiter )) {
235235 throw new IllegalArgumentException ("The delimiter cannot be a line break" );
236236 }
@@ -256,7 +256,7 @@ public char getEncapsulator() {
256256 * @throws IllegalArgumentException
257257 * thrown if the specified character is a line break
258258 */
259- public CSVFormat withEncapsulator (char encapsulator ) {
259+ public CSVFormat withEncapsulator (final char encapsulator ) {
260260 if (isLineBreak (encapsulator )) {
261261 throw new IllegalArgumentException ("The encapsulator cannot be a line break" );
262262 }
@@ -293,7 +293,7 @@ public char getCommentStart() {
293293 * @throws IllegalArgumentException
294294 * thrown if the specified character is a line break
295295 */
296- public CSVFormat withCommentStart (char commentStart ) {
296+ public CSVFormat withCommentStart (final char commentStart ) {
297297 if (isLineBreak (commentStart )) {
298298 throw new IllegalArgumentException ("The comment start character cannot be a line break" );
299299 }
@@ -330,7 +330,7 @@ public char getEscape() {
330330 * @throws IllegalArgumentException
331331 * thrown if the specified character is a line break
332332 */
333- public CSVFormat withEscape (char escape ) {
333+ public CSVFormat withEscape (final char escape ) {
334334 if (isLineBreak (escape )) {
335335 throw new IllegalArgumentException ("The escape character cannot be a line break" );
336336 }
@@ -365,7 +365,7 @@ public boolean getIgnoreSurroundingSpaces() {
365365 * spaces as is.
366366 * @return A copy of this format with the specified trimming behavior.
367367 */
368- public CSVFormat withIgnoreSurroundingSpaces (boolean ignoreSurroundingSpaces ) {
368+ public CSVFormat withIgnoreSurroundingSpaces (final boolean ignoreSurroundingSpaces ) {
369369 return new CSVFormat (delimiter , encapsulator , commentStart , escape , ignoreSurroundingSpaces ,
370370 ignoreEmptyLines , lineSeparator , header );
371371 }
@@ -388,7 +388,7 @@ public boolean getIgnoreEmptyLines() {
388388 * <tt>false</tt> to translate empty lines to empty records.
389389 * @return A copy of this format with the specified empty line skipping behavior.
390390 */
391- public CSVFormat withIgnoreEmptyLines (boolean ignoreEmptyLines ) {
391+ public CSVFormat withIgnoreEmptyLines (final boolean ignoreEmptyLines ) {
392392 return new CSVFormat (delimiter , encapsulator , commentStart , escape , ignoreSurroundingSpaces ,
393393 ignoreEmptyLines , lineSeparator , header );
394394 }
@@ -410,7 +410,7 @@ public String getLineSeparator() {
410410 *
411411 * @return A copy of this format using the specified output line separator
412412 */
413- public CSVFormat withLineSeparator (String lineSeparator ) {
413+ public CSVFormat withLineSeparator (final String lineSeparator ) {
414414 return new CSVFormat (delimiter , encapsulator , commentStart , escape , ignoreSurroundingSpaces ,
415415 ignoreEmptyLines , lineSeparator , header );
416416 }
@@ -438,7 +438,7 @@ String[] getHeader() {
438438 *
439439 * @return A copy of this format using the specified header
440440 */
441- public CSVFormat withHeader (String ... header ) {
441+ public CSVFormat withHeader (final String ... header ) {
442442 return new CSVFormat (delimiter , encapsulator , commentStart , escape , ignoreSurroundingSpaces ,
443443 ignoreEmptyLines , lineSeparator , header );
444444 }
@@ -449,7 +449,7 @@ public CSVFormat withHeader(String... header) {
449449 * @param in
450450 * the input stream
451451 */
452- public Iterable <CSVRecord > parse (Reader in ) throws IOException {
452+ public Iterable <CSVRecord > parse (final Reader in ) throws IOException {
453453 return new CSVParser (in , this );
454454 }
455455
@@ -459,20 +459,20 @@ public Iterable<CSVRecord> parse(Reader in) throws IOException {
459459 * @param values
460460 * the values to format
461461 */
462- public String format (String ... values ) {
463- StringWriter out = new StringWriter ();
462+ public String format (final String ... values ) {
463+ final StringWriter out = new StringWriter ();
464464 try {
465465 new CSVPrinter (out , this ).println (values );
466466 return out .toString ().trim ();
467- } catch (IOException e ) {
467+ } catch (final IOException e ) {
468468 // should not happen
469469 throw new IllegalStateException (e );
470470 }
471471 }
472472
473473 @ Override
474474 public String toString () {
475- StringBuilder sb = new StringBuilder ();
475+ final StringBuilder sb = new StringBuilder ();
476476 sb .append ("Delimiter=<" ).append (delimiter ).append ('>' );
477477 if (isEscaping ()) {
478478 sb .append (' ' );
0 commit comments