Closed ShadowZone closed 4 years ago
Thanks for bringing this to our attention. It's fixed, and we have a new test for validating the fix (in DialectTest.java):
@Test
@DisplayName("test for https://github.com/frictionlessdata/datapackage-java/issues/33, NPE creating Dialect")
void testIssue33(){
Dialect dia = Dialect.fromCsvFormat(CSVFormat.DEFAULT);
}
Overview
I get a NullPointerException when trying this:
The error comes from https://github.com/frictionlessdata/datapackage-java/blob/66f3f82793616cc768f97214c8ac5ff4aa825552/src/main/java/io/frictionlessdata/datapackage/Dialect.java#L140
As
returns null for some CSVFormats (e.g. DEFAULT or EXCEL because the value will not be set).
Please preserve this line to notify @iSnow (lead of this repository)