Changeset 34294
- Timestamp:
- 2020-07-27T15:42:51+12:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/metadata/MetadataToCSV.java
r34285 r34294 344 344 .withQuoteMode(QuoteMode.MINIMAL) 345 345 .withTrim(); 346 347 try (CSVPrinter printer = new CSVPrinter(new FileWriter(csvFile, appendSetting), customCSVFormat)) { 346 347 // try-with-resources breaks on 64 bit Linux nightly binary VM as that uses JDK 6. 348 //try (CSVPrinter printer = new CSVPrinter(new FileWriter(csvFile, appendSetting), customCSVFormat)) { 349 350 CSVPrinter printer = null; 351 try { 352 printer = new CSVPrinter(new FileWriter(csvFile, appendSetting), customCSVFormat); 353 348 354 printer.printRecord(columnHeadings); 349 355 // https://javadoc.io/doc/org.apache.commons/commons-csv/latest/index.html … … 380 386 printer.println(); // done writing a record 381 387 } 388 389 printer.close(true); // flush and close 390 382 391 } catch (IOException ex) { 383 392 success = false; … … 385 394 System.err.println("Caught exception when writing meta to CSVFile " + csvFile.getAbsolutePath()); 386 395 System.err.println("\t" + ex.getMessage()); 396 397 SafeProcess.closeResource(printer); 387 398 } 388 399
Note:
See TracChangeset
for help on using the changeset viewer.