@@ -68,14 +68,14 @@ public void testCSVFile(final File testFile) throws Exception {
6868 boolean checkComments = false ;
6969 for (int i = 1 ; i < split .length ; i ++) {
7070 final String option = split [i ];
71- final String [] option_parts = option .split ("=" , 2 );
72- if ("IgnoreEmpty" .equalsIgnoreCase (option_parts [0 ])) {
73- format = format .withIgnoreEmptyLines (Boolean .parseBoolean (option_parts [1 ]));
74- } else if ("IgnoreSpaces" .equalsIgnoreCase (option_parts [0 ])) {
75- format = format .withIgnoreSurroundingSpaces (Boolean .parseBoolean (option_parts [1 ]));
76- } else if ("CommentStart" .equalsIgnoreCase (option_parts [0 ])) {
77- format = format .withCommentMarker (option_parts [1 ].charAt (0 ));
78- } else if ("CheckComments" .equalsIgnoreCase (option_parts [0 ])) {
71+ final String [] optionParts = option .split ("=" , 2 );
72+ if ("IgnoreEmpty" .equalsIgnoreCase (optionParts [0 ])) {
73+ format = format .withIgnoreEmptyLines (Boolean .parseBoolean (optionParts [1 ]));
74+ } else if ("IgnoreSpaces" .equalsIgnoreCase (optionParts [0 ])) {
75+ format = format .withIgnoreSurroundingSpaces (Boolean .parseBoolean (optionParts [1 ]));
76+ } else if ("CommentStart" .equalsIgnoreCase (optionParts [0 ])) {
77+ format = format .withCommentMarker (optionParts [1 ].charAt (0 ));
78+ } else if ("CheckComments" .equalsIgnoreCase (optionParts [0 ])) {
7979 checkComments = true ;
8080 } else {
8181 fail (testFile .getName () + " unexpected option: " + option );
@@ -86,7 +86,7 @@ public void testCSVFile(final File testFile) throws Exception {
8686
8787 // Now parse the file and compare against the expected results
8888 // We use a buffered reader internally so no need to create one here.
89- try (final CSVParser parser = CSVParser .parse (new File (BASE_DIR , split [0 ]), Charset .defaultCharset (), format )) {
89+ try (CSVParser parser = CSVParser .parse (new File (BASE_DIR , split [0 ]), Charset .defaultCharset (), format )) {
9090 for (final CSVRecord record : parser ) {
9191 String parsed = Arrays .toString (record .values ());
9292 final String comment = record .getComment ();
@@ -113,14 +113,14 @@ public void testCSVUrl(final File testFile) throws Exception {
113113 boolean checkComments = false ;
114114 for (int i = 1 ; i < split .length ; i ++) {
115115 final String option = split [i ];
116- final String [] option_parts = option .split ("=" , 2 );
117- if ("IgnoreEmpty" .equalsIgnoreCase (option_parts [0 ])) {
118- format = format .withIgnoreEmptyLines (Boolean .parseBoolean (option_parts [1 ]));
119- } else if ("IgnoreSpaces" .equalsIgnoreCase (option_parts [0 ])) {
120- format = format .withIgnoreSurroundingSpaces (Boolean .parseBoolean (option_parts [1 ]));
121- } else if ("CommentStart" .equalsIgnoreCase (option_parts [0 ])) {
122- format = format .withCommentMarker (option_parts [1 ].charAt (0 ));
123- } else if ("CheckComments" .equalsIgnoreCase (option_parts [0 ])) {
116+ final String [] optionParts = option .split ("=" , 2 );
117+ if ("IgnoreEmpty" .equalsIgnoreCase (optionParts [0 ])) {
118+ format = format .withIgnoreEmptyLines (Boolean .parseBoolean (optionParts [1 ]));
119+ } else if ("IgnoreSpaces" .equalsIgnoreCase (optionParts [0 ])) {
120+ format = format .withIgnoreSurroundingSpaces (Boolean .parseBoolean (optionParts [1 ]));
121+ } else if ("CommentStart" .equalsIgnoreCase (optionParts [0 ])) {
122+ format = format .withCommentMarker (optionParts [1 ].charAt (0 ));
123+ } else if ("CheckComments" .equalsIgnoreCase (optionParts [0 ])) {
124124 checkComments = true ;
125125 } else {
126126 fail (testFile .getName () + " unexpected option: " + option );
@@ -131,7 +131,7 @@ public void testCSVUrl(final File testFile) throws Exception {
131131
132132 // Now parse the file and compare against the expected results
133133 final URL resource = ClassLoader .getSystemResource ("org/apache/commons/csv/CSVFileParser/" + split [0 ]);
134- try (final CSVParser parser = CSVParser .parse (resource , StandardCharsets .UTF_8 , format )) {
134+ try (CSVParser parser = CSVParser .parse (resource , StandardCharsets .UTF_8 , format )) {
135135 for (final CSVRecord record : parser ) {
136136 String parsed = Arrays .toString (record .values ());
137137 final String comment = record .getComment ();
0 commit comments