File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1238,7 +1238,7 @@ public boolean readRecord() throws IOException {
12381238 // check to see if we hit the end of the file
12391239 // without processing the current record
12401240
1241- if (startedColumn || ( delimiterLen = getColumnDelimiterLen ( lastLetter )) != -1 ) {
1241+ if (startedColumn || delimiterLen != -1 ) {
12421242 if (delimiterLen != -1 ) {
12431243 endColumn (delimiterLen );
12441244 } else {
@@ -1272,7 +1272,7 @@ public boolean readRecord() throws IOException {
12721272 rawRecord = "" ;
12731273 }
12741274
1275- return hasReadNextLine || columnsCount > 0 ;
1275+ return hasReadNextLine ;
12761276 }
12771277
12781278 /**
Original file line number Diff line number Diff line change @@ -2435,11 +2435,7 @@ public void test181() throws Exception {
24352435 reader .setDelimiters (Arrays .asList (",|=:" ));
24362436
24372437 Assert .assertTrue (reader .readRecord ());
2438- // this is non-standard usage
2439- // for strings as delimiter, we cannot check latest character is delimiter,
2440- // but we know that is empty string after the latest letter,
2441- // so we discard empty data
2442- Assert .assertEquals (1 , reader .getColumnCount ());
2438+ Assert .assertEquals (2 , reader .getColumnCount ());
24432439 Assert .assertEquals ("1" , reader .get (0 ));
24442440
24452441 reader .close ();
You can’t perform that action at this time.
0 commit comments