objectcomputing / check-ins

Other
7 stars 7 forks source link

fix: replace deprecated commons-io csv handling #2513

Closed timyates closed 4 days ago

timyates commented 1 week ago

CSVParser deprecated the withXXX methods and switched to a builder pattern in 2.12.0

BOMInputStream also switched to a builder pattern (instead of the constructor) in the same release.

Took advantage of this commit to properly implement the try-with-resources pattern and throw the exception up to the controller (where we catch it) instead of wrapping it in a RuntimeException so we can effectively ignore it in code.

Also renamed a couple of for-loop arguments (as they were called record which is now a Java reserved word