MultiLineCsvParser should needed a test for when an empty String is passed to parser.parser(string).
The result should eb an immediate EOF from the StringReader, which should correspond to a null being returned

Test added:

  @Test
  public void returnNullWhenEmptyPassedIn() {
    assertNull(parser.parse(""));
  }

Test passed.
SimpleCsvParser should also have a test for when an empty String is passed to parser.parse(string).
The result should be the same as if the reader encountered an immediate EOF, which should correspond to a null being returned. Same behaviour as MultiLineCsv parser.

Test added and Failed:

  @Test
  public void returnNullWhenEmptyPassedIn() {
    assertNull(parser.parse(""));
  }


Changed the parse method to test for empty String. The parse0 method unchanged since it is used properly by parseNext and does not require the same check.

@Override
  public List<String> parse(String ln) {
    if (ln == null || ln.isEmpty()) {
      return null;
    }
    return parse0(ln);
  }
Revert "SimpleCsvParser should also have a test for when an empty String is passed to parser.parse(string). The result should be the same as if the reader encountered an immediate EOF, which should correspond to a null being returned. Same behaviour as MultiLineCsv parser."

This reverts commit 90fd0bd3f44d450683c30f56b97351460e4510ef.
SimpleCsvParser should also have a test for when an empty String is passed to parser.parse(string).
The result should be the same as if the reader encountered an immediate EOF, which should correspond to a null being returned. Same behaviour as MultiLineCsv parser.

Test added and Failed:

  @Test
  public void returnNullWhenEmptyPassedIn() {
    assertNull(parser.parse(""));
  }


Changed the parse method to test for empty String. The parse0 method unchanged since it is used properly by parseNext and does not require the same check.

@Override
  public List<String> parse(String ln) {
    if (ln == null || ln.isEmpty()) {
      return null;
    }
    return parse0(ln);
  }
Test added in this commit was missed in last commit:

  @Test
  public void returnNullWhenEmptyPassedIn() {
    assertNull(parser.parse(""));
  }
Changed qualifier for entering processing of doubleEscapedQuotes to make sure that already not in escape state.

This: 

if (allowsDoubledEscapedQuotes && state.inQuotes) {
...
}

Changed to:

if (allowsDoubledEscapedQuotes && !state.inEscape && state.inQuotes) {
...
}
Merge pull request #11 from footloosejava/v2.0

MultiLineCsvParser needed a test for when an empty String is passed in.