This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository tutti. See http://git.codelutin.com/tutti.git commit 27a51382557ae6bf3dc0d1ce394f76cc45ab1c1e Author: Tony CHEMIT <chemit@codelutin.com> Date: Fri Dec 18 08:41:21 2015 +0100 Correction de l'export du modèle de catégorisation (Fixes #7585) --- .../service/genericformat/GenericFormatExportService.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tutti-service/src/main/java/fr/ifremer/tutti/service/genericformat/GenericFormatExportService.java b/tutti-service/src/main/java/fr/ifremer/tutti/service/genericformat/GenericFormatExportService.java index de35d33..f3247ee 100644 --- a/tutti-service/src/main/java/fr/ifremer/tutti/service/genericformat/GenericFormatExportService.java +++ b/tutti-service/src/main/java/fr/ifremer/tutti/service/genericformat/GenericFormatExportService.java @@ -140,21 +140,22 @@ public class GenericFormatExportService extends AbstractTuttiService { * @param exportFile where to export sample category model * @since 3.14 */ - public void exportSampleCategoryModel(File exportFile) { + public void exportSampleCategoryModel(File exportFile) throws IOException { ProgressionModel progressionModel = new ProgressionModel(); progressionModel.setTotal(1000); GenericFormatArchive archive = GenericFormatArchive.forExport(null, context.getConfig().getTmpDirectory()); - CsvProducerForSampleCategory producerForSampleCategory = new CsvProducerForSampleCategory(archive.getSampleCategoryModelPath(), SampleCategoryModel.forExport(';')); + try (CsvProducerForSampleCategory producerForSampleCategory = new CsvProducerForSampleCategory(archive.getSampleCategoryModelPath(), SampleCategoryModel.forExport(';'))) { - List<SampleCategoryRow> dataToExport = producerForSampleCategory.getDataToExport(context.getSampleCategoryModel()); + List<SampleCategoryRow> dataToExport = producerForSampleCategory.getDataToExport(context.getSampleCategoryModel()); - try { - producerForSampleCategory.write(dataToExport); - } catch (Exception e) { - throw new ApplicationTechnicalException("Could not export sample category model", e); + try { + producerForSampleCategory.write(dataToExport); + } catch (Exception e) { + throw new ApplicationTechnicalException("Could not export sample category model", e); + } } try { -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.