Fix compiler warnings.
This commit is contained in:
parent
0ec08e400b
commit
18ed616214
|
@ -30,15 +30,17 @@ import org.junit.Test;
|
||||||
public class JiraCsv198Test {
|
public class JiraCsv198Test {
|
||||||
|
|
||||||
private static final CSVFormat CSV_FORMAT = CSVFormat.EXCEL.withDelimiter('^').withFirstRecordAsHeader();
|
private static final CSVFormat CSV_FORMAT = CSVFormat.EXCEL.withDelimiter('^').withFirstRecordAsHeader();
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void test() throws UnsupportedEncodingException, IOException {
|
public void test() throws UnsupportedEncodingException, IOException {
|
||||||
InputStream pointsOfReference = getClass().getResourceAsStream("/CSV-198/optd_por_public.csv");
|
InputStream pointsOfReference = getClass().getResourceAsStream("/CSV-198/optd_por_public.csv");
|
||||||
Assert.assertNotNull(pointsOfReference);
|
Assert.assertNotNull(pointsOfReference);
|
||||||
CSVParser parser = CSV_FORMAT.parse(new InputStreamReader(pointsOfReference, "UTF-8"));
|
try (@SuppressWarnings("resource")
|
||||||
for (CSVRecord record : parser) {
|
CSVParser parser = CSV_FORMAT.parse(new InputStreamReader(pointsOfReference, "UTF-8"))) {
|
||||||
String locationType = record.get("location_type");
|
for (CSVRecord record : parser) {
|
||||||
Assert.assertNotNull(locationType);
|
String locationType = record.get("location_type");
|
||||||
|
Assert.assertNotNull(locationType);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue