fortify is complaining about the following code:
protected void doStuff() throws Exception{
try (CSVReader csvReader = new CSVReader(new FileReader(file))) {
...
String[] read;
read = csvReader.readNext();
...
}
}
in the case that FileReader throws an exception. Im new to java, its unclear to me why the try with resources block doesnt handle the case. How to handle this?