This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository faxtomail. See https://gitlab.nuiton.org/codelutin/faxtomail.git commit a16452b59b0a61c5dde4c71b1bc26ca8929d3f80 Author: jcouteau <couteau@codelutin.com> Date: Wed Apr 24 16:40:54 2019 +0200 Fix NPE and ArrayOutOfBound and change version (gnic put snapshot into prod again :( ) --- faxtomail-persistence/pom.xml | 2 +- faxtomail-service/pom.xml | 2 +- faxtomail-ui-swing/pom.xml | 2 +- .../ui/swing/content/demande/DemandeUIHandler.java | 4 ++-- .../faxtomail/ui/swing/util/FaxToMailUIUtil.java | 18 +++++++----------- faxtomail-ui-web/pom.xml | 2 +- pom.xml | 2 +- 7 files changed, 14 insertions(+), 18 deletions(-) diff --git a/faxtomail-persistence/pom.xml b/faxtomail-persistence/pom.xml index edf9cd08..10476c58 100644 --- a/faxtomail-persistence/pom.xml +++ b/faxtomail-persistence/pom.xml @@ -25,7 +25,7 @@ <parent> <artifactId>faxtomail</artifactId> <groupId>com.franciaflex</groupId> - <version>2.4.27-SNAPSHOT</version> + <version>2.4.28-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> diff --git a/faxtomail-service/pom.xml b/faxtomail-service/pom.xml index ce750d7b..f09360a1 100644 --- a/faxtomail-service/pom.xml +++ b/faxtomail-service/pom.xml @@ -27,7 +27,7 @@ <parent> <artifactId>faxtomail</artifactId> <groupId>com.franciaflex</groupId> - <version>2.4.27-SNAPSHOT</version> + <version>2.4.28-SNAPSHOT</version> </parent> <groupId>com.franciaflex.faxtomail</groupId> diff --git a/faxtomail-ui-swing/pom.xml b/faxtomail-ui-swing/pom.xml index e3b0afdc..a948cf29 100644 --- a/faxtomail-ui-swing/pom.xml +++ b/faxtomail-ui-swing/pom.xml @@ -28,7 +28,7 @@ <parent> <groupId>com.franciaflex</groupId> <artifactId>faxtomail</artifactId> - <version>2.4.27-SNAPSHOT</version> + <version>2.4.28-SNAPSHOT</version> </parent> <groupId>com.franciaflex.faxtomail</groupId> diff --git a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIHandler.java b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIHandler.java index 1157dc06..4da597a0 100644 --- a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIHandler.java +++ b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIHandler.java @@ -287,7 +287,7 @@ public class DemandeUIHandler extends AbstractFaxToMailUIHandler<DemandeUIModel, } public void resize(){ - if (mailBodyPanel.getComponent(0) instanceof JScrollPane) { + if (mailBodyPanel.getComponents().length > 0 && mailBodyPanel.getComponent(0) instanceof JScrollPane) { JScrollPane holder = (JScrollPane) mailBodyPanel.getComponent(0); JTextPane pane = (JTextPane) ((JViewport) holder.getComponent(0)).getComponent(0); @@ -319,7 +319,7 @@ public class DemandeUIHandler extends AbstractFaxToMailUIHandler<DemandeUIModel, // init table final JXTable table = ui.getRangeTable(); - // utilisation des gammes défini pour le dossier (si défini) + // utilisation des gammes définies pour le dossier (si définies) List<Range> ranges = new ArrayList<>(); Collection<Range> folderRanges = getRangeForFolder(folder); if (CollectionUtils.isEmpty(folderRanges)) { diff --git a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/FaxToMailUIUtil.java b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/FaxToMailUIUtil.java index 48c02c2e..19547163 100644 --- a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/FaxToMailUIUtil.java +++ b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/FaxToMailUIUtil.java @@ -346,28 +346,26 @@ public final class FaxToMailUIUtil extends ApplicationUIUtil { List<String> contents = demandeUIModel.getHtmlContent(); - if (contents != null) { - + if (CollectionUtils.isNotEmpty(contents)) { for (String content : contents) { if (content != null) { addHtmlTextPane(handler, demandeUIModel, textPanePanel, content); } } - } // if there is no html content or if no html content can be correctly displayed (ie throws an exception) // then display plain content as html (prevent plain content with html tags to be raw displayed) if (textPanePanel.getComponentCount() == 0) { - contents = demandeUIModel.getPlainContent(); - for (String content : contents) { - if (content != null) { - addHtmlTextPane(handler, demandeUIModel, textPanePanel, content); + if (CollectionUtils.isNotEmpty(contents)) { + for (String content : contents) { + if (content != null) { + addHtmlTextPane(handler, demandeUIModel, textPanePanel, content); + } } } - } // if there is no html content or if no html content can be correctly displayed (ie throws an exception) @@ -376,10 +374,8 @@ public final class FaxToMailUIUtil extends ApplicationUIUtil { contents = demandeUIModel.getPlainContent(); - if (contents != null) { - + if (CollectionUtils.isNotEmpty(contents)) { for (String content : contents) { - if (content != null) { final JTextPane textPane = new JTextPane(); boolean newDemand = StringUtils.isBlank(demandeUIModel.getTopiaId()); diff --git a/faxtomail-ui-web/pom.xml b/faxtomail-ui-web/pom.xml index 16927cc9..eda8f7ff 100644 --- a/faxtomail-ui-web/pom.xml +++ b/faxtomail-ui-web/pom.xml @@ -27,7 +27,7 @@ <parent> <groupId>com.franciaflex</groupId> <artifactId>faxtomail</artifactId> - <version>2.4.27-SNAPSHOT</version> + <version>2.4.28-SNAPSHOT</version> </parent> <groupId>com.franciaflex.faxtomail</groupId> diff --git a/pom.xml b/pom.xml index 7f0a4fcb..3412dd2a 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ <groupId>com.franciaflex</groupId> <artifactId>faxtomail</artifactId> - <version>2.4.27-SNAPSHOT</version> + <version>2.4.28-SNAPSHOT</version> <packaging>pom</packaging> <name>FaxToMail</name> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.