File tree Expand file tree Collapse file tree
main/java/org/apache/commons/csv
test/java/org/apache/commons/csv Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ public String[][] getRecords() throws IOException {
179179 }
180180
181181 /**
182- * Parses from the current point in the stream til * the end of the current line.
182+ * Parses from the current point in the stream til the end of the current line.
183183 *
184184 * @return array of values til end of line ('null' when end of file has been reached)
185185 * @throws IOException on parse error or input read-failure
@@ -279,13 +279,6 @@ public int getLineNumber() {
279279 // the lexer(s)
280280 // ======================================================
281281
282- /**
283- * Convenience method for <code>nextToken(null)</code>.
284- */
285- Token nextToken () throws IOException {
286- return nextToken (new Token ());
287- }
288-
289282 /**
290283 * Returns the next token.
291284 * <p/>
@@ -580,11 +573,9 @@ private boolean isWhitespace(int c) {
580573 */
581574 private boolean isEndOfLine (int c ) throws IOException {
582575 // check if we have \r\n...
583- if (c == '\r' ) {
584- if (in .lookAhead () == '\n' ) {
585- // note: does not change c outside of this method !!
586- c = in .read ();
587- }
576+ if (c == '\r' && in .lookAhead () == '\n' ) {
577+ // note: does not change c outside of this method !!
578+ c = in .read ();
588579 }
589580 return (c == '\n' || c == '\r' );
590581 }
Original file line number Diff line number Diff line change @@ -63,10 +63,10 @@ class TestCSVParser extends CSVParser {
6363 * type and content.
6464 *
6565 * @return String representation of token type and content
66- * @throws IOException like {@link CSVParser#nextToken()}
66+ * @throws IOException like {@link CSVParser#nextToken(Token )}
6767 */
6868 public String testNextToken () throws IOException {
69- Token t = super .nextToken ();
69+ Token t = super .nextToken (new Token () );
7070 return t .type .name () + ";" + t .content + ";" ;
7171 }
7272 }
You can’t perform that action at this time.
0 commit comments