Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.10.1
Description
When a file is read with a CSVReader and a POJO is specified and the filed names are not specified, the output is obviously not correct. The API is not throwing any error despite a null check inside the API. i.e.
Preconditions.checkNotNull(pojoFields, "POJO fields must be specified (not null) if output type is a POJO.");
The root cause of the problem is that the fieldNames argument is a variable argument and the variable is 'empty but not null' when not given any value. So, the check passes without failing.
I am not sure if it is a feature of the API or an actual bug because there is a test checking the NPE when a null is passed.
Attachments
Issue Links
- links to