Use standard constant

This commit is contained in:
Gary Gregory 2023-12-10 13:09:58 -05:00
parent fb21d69d3f
commit b8a36abe3b

View File

@ -214,7 +214,7 @@ public class CSVParserTest {
@Disabled("CSV-107")
public void testBOM() throws IOException {
final URL url = ClassLoader.getSystemClassLoader().getResource("org/apache/commons/csv/CSVFileParser/bom.csv");
try (final CSVParser parser = CSVParser.parse(url, Charset.forName(UTF_8_NAME), CSVFormat.EXCEL.withHeader())) {
try (final CSVParser parser = CSVParser.parse(url, StandardCharsets.UTF_8, CSVFormat.EXCEL.withHeader())) {
parser.forEach(record -> assertNotNull(record.get("Date")));
}
}