File tree Expand file tree Collapse file tree
src/main/java/org/apache/commons/csv Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -193,16 +193,6 @@ boolean isStartOfLine(final int ch) {
193193 return ch == LF || ch == CR || ch == UNDEFINED ;
194194 }
195195
196- /**
197- * Tests if the given char is a whitespace character.
198- *
199- * @return true if the given char is a whitespace character.
200- * @throws IOException If an I/O error occurs.
201- */
202- boolean isWhitespace (final int ch ) throws IOException {
203- return !isDelimiter (ch ) && Character .isWhitespace ((char ) ch );
204- }
205-
206196 private char mapNullToDisabled (final Character c ) {
207197 return c == null ? DISABLED : c .charValue ();
208198 }
@@ -271,7 +261,7 @@ Token nextToken(final Token token) throws IOException {
271261 while (token .type == INVALID ) {
272262 // ignore whitespaces at beginning of a token
273263 if (ignoreSurroundingSpaces ) {
274- while (isWhitespace (c ) && !eol ) {
264+ while (Character . isWhitespace (( char ) c ) && ! isDelimiter (c ) && !eol ) {
275265 c = reader .read ();
276266 eol = readEndOfLine (c );
277267 }
@@ -364,7 +354,7 @@ private Token parseEncapsulatedToken(final Token token) throws IOException {
364354 token .type = EORECORD ;
365355 return token ;
366356 }
367- if (!isWhitespace (c )) {
357+ if (!Character . isWhitespace (( char ) c )) {
368358 // error invalid char between token and next delimiter
369359 throw new IOException ("(line " + getCurrentLineNumber () +
370360 ") invalid char between encapsulated token and delimiter" );
You can’t perform that action at this time.
0 commit comments