Fix compiler warnings.

This commit is contained in:
Gary Gregory 2016-12-01 13:27:06 -08:00
parent 0ec08e400b
commit 18ed616214
1 changed files with 7 additions and 5 deletions

View File

@ -35,11 +35,13 @@ public class JiraCsv198Test {
public void test() throws UnsupportedEncodingException, IOException {
InputStream pointsOfReference = getClass().getResourceAsStream("/CSV-198/optd_por_public.csv");
Assert.assertNotNull(pointsOfReference);
CSVParser parser = CSV_FORMAT.parse(new InputStreamReader(pointsOfReference, "UTF-8"));
try (@SuppressWarnings("resource")
CSVParser parser = CSV_FORMAT.parse(new InputStreamReader(pointsOfReference, "UTF-8"))) {
for (CSVRecord record : parser) {
String locationType = record.get("location_type");
Assert.assertNotNull(locationType);
}
}
}
}