r75 - trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/utils/links
Author: echatellier Date: 2013-02-05 18:19:14 +0100 (Tue, 05 Feb 2013) New Revision: 75 Url: http://forge.codelutin.com/projects/cantharella/repository/revisions/75 Log: Remove static date format (not thread safe) Modified: trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/utils/links/CsvExportLink.java Modified: trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/utils/links/CsvExportLink.java =================================================================== --- trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/utils/links/CsvExportLink.java 2013-02-05 17:09:49 UTC (rev 74) +++ trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/utils/links/CsvExportLink.java 2013-02-05 17:19:14 UTC (rev 75) @@ -49,9 +49,6 @@ /** For serializable methods */ private static final long serialVersionUID = 20130204L; - - /** Date format for download filename. */ - private static final DateFormat FILENAME_DF = new SimpleDateFormat("yyyy_MM_dd-HH_mm-"); /** Data table containing data to export. */ private final DataTable<T> table; @@ -81,7 +78,8 @@ response.setContentType("text/csv"); // configuration du nom de fichier - String headerFilename = FILENAME_DF.format(new Date()); + DateFormat dateFormat = new SimpleDateFormat("yyyy_MM_dd-HH_mm-"); + String headerFilename = dateFormat.format(new Date()); headerFilename += this.filename; response.setAttachmentHeader(headerFilename);
participants (1)
-
echatellier@users.forge.codelutin.com