Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-csv
This commit is contained in:
commit
4a865fd7f8
2
pom.xml
2
pom.xml
|
@ -442,7 +442,7 @@
|
|||
<dependency>
|
||||
<groupId>com.opencsv</groupId>
|
||||
<artifactId>opencsv</artifactId>
|
||||
<version>5.7.0</version>
|
||||
<version>5.7.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
<action type="update" dev="ggregory" due-to="Dependabot, Gary Gregory">Bump mockito-core from 3.11.2 to 4.8.1 #187, #197, #204, #212, #230, #237, #251, #259.</action>
|
||||
<action type="update" dev="ggregory" due-to="Dependabot">Bump maven-pmd-plugin from 3.14.0 to 3.19.0 #184, #219, #238, #254, #258.</action>
|
||||
<action type="update" dev="ggregory" due-to="Dependabot, Gary Gregory">Bump pmd from 6.36.0 to 6.50.0 #173, #189, #193, #199, #227, #233, #214, #236, #240, #247, #255, #273.</action>
|
||||
<action type="update" dev="ggregory" due-to="Gary Gregory">Bump opencsv from 5.5.1 to 5.7.0 #182, #221, #260.</action>
|
||||
<action type="update" dev="ggregory" due-to="Gary Gregory">Bump opencsv from 5.5.1 to 5.7.1 #182, #221, #260, #281.</action>
|
||||
<action type="update" dev="ggregory" due-to="Dependabot">Bump spotbugs-maven-plugin from 4.3.0 to 4.7.2.1 #192, #198, #203, #211, #225, #234, #242, #245, #261, #275.</action>
|
||||
<action type="update" dev="ggregory" due-to="Gary Gregory">Bump com.github.spotbugs:spotbugs from 4.5.3 to 4.7.2.</action>
|
||||
<action type="update" dev="kinow" due-to="Dependabot">Bump h2 from 1.4.200 to 2.1.214 #200, #205, #213, #239.</action>
|
||||
|
|
|
@ -906,8 +906,10 @@ public class CSVParserTest {
|
|||
final Iterator<CSVRecord> records = parser.iterator();
|
||||
final CSVRecord record = records.next();
|
||||
// Expect the null header to be missing
|
||||
assertEquals(Arrays.asList("header1", "header3"), record.getParser().getHeaderNames());
|
||||
assertEquals(2, record.getParser().getHeaderMap().size());
|
||||
@SuppressWarnings("resource")
|
||||
final CSVParser recordParser = record.getParser();
|
||||
assertEquals(Arrays.asList("header1", "header3"), recordParser.getHeaderNames());
|
||||
assertEquals(2, recordParser.getHeaderMap().size());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1133,7 +1135,8 @@ public class CSVParserTest {
|
|||
final CSVFormat format = CSVFormat.DEFAULT.withHeader("A", "B", "C", "D");
|
||||
final Charset charset = StandardCharsets.UTF_8;
|
||||
|
||||
try (final CSVParser parser = CSVParser.parse(new InputStreamReader(url.openStream(), charset), format)) {
|
||||
try (@SuppressWarnings("resource") // CSVParser closes the input resource
|
||||
final CSVParser parser = CSVParser.parse(new InputStreamReader(url.openStream(), charset), format)) {
|
||||
parseFully(parser);
|
||||
}
|
||||
try (final CSVParser parser = CSVParser.parse(new String(Files.readAllBytes(Paths.get(url.toURI())), charset), format)) {
|
||||
|
@ -1142,7 +1145,8 @@ public class CSVParserTest {
|
|||
try (final CSVParser parser = CSVParser.parse(new File(url.toURI()), charset, format)) {
|
||||
parseFully(parser);
|
||||
}
|
||||
try (final CSVParser parser = CSVParser.parse(url.openStream(), charset, format)) {
|
||||
try (@SuppressWarnings("resource") // CSVParser closes the input resource
|
||||
final CSVParser parser = CSVParser.parse(url.openStream(), charset, format)) {
|
||||
parseFully(parser);
|
||||
}
|
||||
try (final CSVParser parser = CSVParser.parse(Paths.get(url.toURI()), charset, format)) {
|
||||
|
@ -1314,7 +1318,9 @@ public class CSVParserTest {
|
|||
try (final CSVParser parser = CSVFormat.DEFAULT.withFirstRecordAsHeader().withTrim().parse(in)) {
|
||||
final Iterator<CSVRecord> records = parser.iterator();
|
||||
final CSVRecord record = records.next();
|
||||
assertEquals(Arrays.asList("header1", "header2", "header1"), record.getParser().getHeaderNames());
|
||||
@SuppressWarnings("resource")
|
||||
final CSVParser recordParser = record.getParser();
|
||||
assertEquals(Arrays.asList("header1", "header2", "header1"), recordParser.getHeaderNames());
|
||||
}}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue