branch develop updated (964faf1 -> 80adf13)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository lima. See http://git.chorem.org/lima.git from 964faf1 fixes #1187: Améliorer l'apparence des Popup Merge branch 'feature/1187' into develop new 3c0f684 refs #1221: Erreur à l'annulation des import/export new 80adf13 fixes #1221 Erreur à l'annulation des import/export Merge branch 'feature/1221' into develop The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 80adf132009d802d544ea7e74a756630d4f0485c Merge: 964faf1 3c0f684 Author: Tony CHEMIT <chemit@codelutin.com> Date: Fri Apr 24 14:49:23 2015 +0200 fixes #1221 Erreur à l'annulation des import/export Merge branch 'feature/1221' into develop commit 3c0f684fdaff23aad6a0ff320dc40997b59daf73 Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Apr 8 09:30:34 2015 +0200 refs #1221: Erreur à l'annulation des import/export Summary of changes: .../chorem/lima/ui/importexport/ImportExport.java | 55 ++++++++++++---------- 1 file changed, 31 insertions(+), 24 deletions(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository lima. See http://git.chorem.org/lima.git commit 3c0f684fdaff23aad6a0ff320dc40997b59daf73 Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Apr 8 09:30:34 2015 +0200 refs #1221: Erreur à l'annulation des import/export --- .../chorem/lima/ui/importexport/ImportExport.java | 55 ++++++++++++---------- 1 file changed, 31 insertions(+), 24 deletions(-) diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java b/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java index d0c4de2..8ab4506 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java @@ -140,15 +140,17 @@ public class ImportExport { final Charset defaultCharset = Charsets.UTF_8; if (Strings.isNullOrEmpty(exportPath) && importUrl == null) { exportPath = chooseFile(importExportChoice.getImportMode(), importExportChoice); - File file = new File(exportPath); - if (file.exists()) { - try { - importUrl = file.toURI().toURL(); - } catch (MalformedURLException e) { - throw new LimaTechnicalException("Can't open file " + exportPath); + if (exportPath != null) { // if null ==> cancel import/export + File file = new File(exportPath); + if (file.exists()) { + try { + importUrl = file.toURI().toURL(); + } catch (MalformedURLException e) { + throw new LimaTechnicalException("Can't open file " + exportPath); + } + } else { + throw new LimaTechnicalException("Can't open file from path" + exportPath); } - } else { - throw new LimaTechnicalException("Can't open file from path" + exportPath); } } processImportExport(verbose, importExportChoice, defaultCharset, exportPath, importUrl); @@ -189,27 +191,32 @@ public class ImportExport { final Charset defaultCharset = Charsets.UTF_8; URL importFileUrl; String importFilePath = chooseFile(importExportChoice.getImportMode(), importExportChoice); - File file = new File(importFilePath); - if (file.exists()) { - try { - importFileUrl = file.toURI().toURL(); - } catch (MalformedURLException e) { - throw new LimaTechnicalException("Can't open file " + importFilePath); + if (importFilePath != null) { // if null ==> cancel import + File file = new File(importFilePath); + if (file.exists()) { + try { + importFileUrl = file.toURI().toURL(); + } catch (MalformedURLException e) { + throw new LimaTechnicalException("Can't open file " + importFilePath); + } + } else { + throw new LimaTechnicalException("Can't open file from path" + importFilePath); } - } else { - throw new LimaTechnicalException("Can't open file from path" + importFilePath); + log.info("Precessing import:" + importFileUrl.getPath() + " " + importFilePath + " " + importFileUrl.getFile()); + processImportExport(verbose, importExportChoice, defaultCharset, null, importFileUrl); } - log.info("Precessing import:" + importFileUrl.getPath() + " " + importFilePath + " " + importFileUrl.getFile()); - processImportExport(verbose, importExportChoice, defaultCharset, null, importFileUrl); } protected void processExport(final ImportExportEnum importExportChoice, boolean verbose) { String exportFilePath = chooseFile(importExportChoice.getImportMode(), importExportChoice); - if (StringUtils.isNotBlank(exportFilePath)) { - log.info("Precessing export:" + exportFilePath); - processImportExport(verbose, importExportChoice, Charsets.UTF_8, exportFilePath, null); - } else { - throw new LimaTechnicalException("Targeted directory can not be found."); + if (exportFilePath != null) { // if null ==> cancel export + File file = new File(exportFilePath); + if (file.exists()) { + log.info("Precessing export:" + exportFilePath); + processImportExport(verbose, importExportChoice, Charsets.UTF_8, exportFilePath, null); + } else { + throw new LimaTechnicalException("Targeted directory can not be found."); + } } } @@ -500,7 +507,7 @@ public class ImportExport { * @return the targeted file path */ public String chooseFile(Boolean importMode, ImportExportEnum importExportMethod) { - String filePath = ""; + String filePath = null; JFileChooser chooser = new JFileChooser(); //Encoding option -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository lima. See http://git.chorem.org/lima.git commit 80adf132009d802d544ea7e74a756630d4f0485c Merge: 964faf1 3c0f684 Author: Tony CHEMIT <chemit@codelutin.com> Date: Fri Apr 24 14:49:23 2015 +0200 fixes #1221 Erreur à l'annulation des import/export Merge branch 'feature/1221' into develop .../chorem/lima/ui/importexport/ImportExport.java | 55 ++++++++++++---------- 1 file changed, 31 insertions(+), 24 deletions(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm