Skip to content
Permalink
Browse files
Update CSVParser.parse(File, Charset, CSVFormat) from IO to NIO.
  • Loading branch information
garydgregory committed Jul 3, 2021
1 parent 83ad213 commit 8568e8865a0c18e06b282a103bfea01fc443e7bd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
@@ -40,28 +40,29 @@
<body>
<release version="1.9" date="2020-MM-DD" description="Feature and bug fix release (Java 8)">
<!-- FIX -->
<action type="add" dev="ggregory" due-to="dota17">Add test cases for CSVRecord with get(Enum) and toString. #54.</action>
<action type="update" dev="ggregory" due-to="Amey Jadiye">Replace FindBugs with SpotBugs #56.</action>
<action type="update" dev="ggregory" due-to="Chen">Javadoc typo in CSVFormat let's -> lets #57.</action>
<action type="fix" dev="ggregory" due-to="Amey Jadiye">Replace FindBugs with SpotBugs #56.</action>
<action type="fix" dev="ggregory" due-to="Chen">Javadoc typo in CSVFormat let's -> lets #57.</action>
<action issue="CSV-259" type="fix" dev="ggregory" due-to="Chen">CSVFormat.printWithEscapes throws StringIndexOutOfBoundsException when value is Reader #61.</action>
<action issue="CSV-184" type="add" dev="ggregory" due-to="Gaurav Agarwal, M. Steiger, Gary Gregory">Make the method CSVRecord.putIn(Map) public.</action>
<action type="update" dev="ggregory" due-to="Chen">Improve CSVFormat test coverage #63.</action>
<action type="update" dev="ggregory" due-to="Chen">Fix CSVFileParserTest.java to allow for a null return value from record.getComment() #62.</action>
<action type="update" dev="ggregory" due-to="Chen">Improve test coverage in CSVFormatTest #65.</action>
<action type="update" dev="ggregory" due-to="Chen">Removed invalid Javadoc markup for CSVFormat EXCEL #64.</action>
<action type="update" dev="ggregory" due-to="Chen">Improve CSVRecord and CSVPrinter code coverage #66.</action>
<action type="update" dev="ggregory" due-to="Chen">Improve lexer and token coverage #67.</action>
<action type="fix" dev="ggregory" due-to="Chen">Improve CSVFormat test coverage #63.</action>
<action type="fix" dev="ggregory" due-to="Chen">Fix CSVFileParserTest.java to allow for a null return value from record.getComment() #62.</action>
<action type="fix" dev="ggregory" due-to="Chen">Improve test coverage in CSVFormatTest #65.</action>
<action type="fix" dev="ggregory" due-to="Chen">Removed invalid Javadoc markup for CSVFormat EXCEL #64.</action>
<action type="fix" dev="ggregory" due-to="Chen">Improve CSVRecord and CSVPrinter code coverage #66.</action>
<action type="fix" dev="ggregory" due-to="Chen">Improve lexer and token coverage #67.</action>
<action issue="CSV-211" type="fix" dev="ggregory" due-to="Alpesh Kulkarni, Chen">CSVFormat.format trims last delimiter if the delimiter is a white space #71.</action>
<action type="update" dev="ggregory" due-to="Gary Gregory">Replace org.apache.commons.csv.Assertions.notNull() with Objects.requireNonNull().</action>
<action type="fix" dev="ggregory" due-to="Gary Gregory">Replace org.apache.commons.csv.Assertions.notNull() with Objects.requireNonNull().</action>
<action issue="CSV-149" type="fix" dev="ggregory" due-to="Kranthi, Gary Gregory, Brent Worden, dota17">Line number is not proper at EOF.</action>
<action issue="CSV-195" type="fix" dev="ggregory" due-to="Rodolfo Duldulao, Rodolfo Duldulao, Michael Vitz, dota17">Parser iterates over the last CSV Record twice.</action>
<action issue="CSV-267" type="fix" dev="ggregory" due-to="Arturo Bernal">Minor improvements #126, #127, #130.</action>
<action issue="CSV-123" type="fix" dev="ggregory" due-to="Emmanuel Bourg, Benedikt Ritter, shivakrishnaah, Gary Gregory">Add possibility to use ResultSet header meta data as CSV header #11.</action>
<action issue="CSV-148" type="fix" dev="ggregory" due-to="dota17">Add test cases for withIgnoreSurroundingSpaces() and withTrim() #70.</action>
<action type="fix" dev="ggregory" due-to="Gary Gregory">Update CSVParser.parse(File, Charset, CSVFormat) from IO to NIO.</action>
<!-- ADD -->
<action issue="CSV-275" type="add" dev="ggregory" due-to="Michael Wyraz, Gary Gregory">Make CSVRecord#toList() public.</action>
<action type="add" dev="ggregory" due-to="Gary Gregory">Add CSVRecord#stream().</action>
<action type="add" dev="ggregory" due-to="Gary Gregory">Add CSVParser#stream().</action>
<action issue="CSV-184" type="add" dev="ggregory" due-to="Gaurav Agarwal, M. Steiger, Gary Gregory">Make the method CSVRecord.putIn(Map) public.</action>
<action type="add" dev="ggregory" due-to="dota17">Add test cases for CSVRecord with get(Enum) and toString. #54.</action>
<!-- UPDATE -->
<action type="update" dev="ggregory" due-to="Gary Gregory">Update org.junit.jupiter:junit-jupiter from 5.6.0 to 5.7.0, #84 #109</action>
<action type="update" dev="ggregory" due-to="Gary Gregory">Update tests from Apache Commons Lang 3.9 to 3.12.0.</action>
@@ -223,11 +223,9 @@ private static final class Headers {
* @throws IOException
* If an I/O error occurs
*/
@SuppressWarnings("resource")
public static CSVParser parse(final File file, final Charset charset, final CSVFormat format) throws IOException {
Objects.requireNonNull(file, "file");
Objects.requireNonNull(format, "format");
return new CSVParser(new InputStreamReader(new FileInputStream(file), charset), format);
return parse(file.toPath(), charset, format);
}

/**

0 comments on commit 8568e88

Please sign in to comment.