branch develop updated (98b67ad1 -> 2da46173)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository faxtomail. See https://gitlab.nuiton.org/codelutin/faxtomail.git from 98b67ad1 Fix Hibernate exception new 6b67fcf3 Fix typo new deee9322 Fix potential NPE new a6ece3de Fix potential NPE new 2da46173 Really fix hibernate mess The 4 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 2da46173847edd16f2e72f3a1418be35cee85e98 Author: jcouteau <couteau@codelutin.com> Date: Thu Sep 27 14:28:26 2018 +0200 Really fix hibernate mess commit a6ece3dec62eeb55aca165826f933d01710f3b50 Author: jcouteau <couteau@codelutin.com> Date: Thu Sep 27 10:35:03 2018 +0200 Fix potential NPE commit deee9322d2016d4c21efa10c6de7c5050879a722 Author: jcouteau <couteau@codelutin.com> Date: Thu Sep 27 10:34:18 2018 +0200 Fix potential NPE commit 6b67fcf3d99ad364121888287af1e7f113eb9157 Author: jcouteau <couteau@codelutin.com> Date: Thu Sep 27 09:48:08 2018 +0200 Fix typo Summary of changes: .../services/service/ClientServiceImpl.java | 7 ++---- .../services/service/EmailServiceImpl.java | 25 ++++++++++++++++------ 2 files changed, 21 insertions(+), 11 deletions(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
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 6b67fcf3d99ad364121888287af1e7f113eb9157 Author: jcouteau <couteau@codelutin.com> Date: Thu Sep 27 09:48:08 2018 +0200 Fix typo --- .../com/franciaflex/faxtomail/services/service/EmailServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailServiceImpl.java b/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailServiceImpl.java index 8900bcc8..45585460 100644 --- a/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailServiceImpl.java +++ b/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailServiceImpl.java @@ -423,7 +423,7 @@ public class EmailServiceImpl extends FaxToMailServiceSupport implements EmailSe int result2 = historyStatement.executeUpdate(); if (result != 1 || result2 != 1) { - log.error(String.format("Could not take email ($s) by user ($s)", email.getTopiaId(), user.getTopiaId())); + log.error(String.format("Could not take email (%s) by user (%s)", email.getTopiaId(), user.getTopiaId())); } } } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
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 deee9322d2016d4c21efa10c6de7c5050879a722 Author: jcouteau <couteau@codelutin.com> Date: Thu Sep 27 10:34:18 2018 +0200 Fix potential NPE --- .../franciaflex/faxtomail/services/service/ClientServiceImpl.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ClientServiceImpl.java b/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ClientServiceImpl.java index 67f145b0..9b356aab 100644 --- a/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ClientServiceImpl.java +++ b/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ClientServiceImpl.java @@ -361,13 +361,10 @@ public class ClientServiceImpl extends FaxToMailServiceSupport implements Client for (MailFolder folder : folders) { MailFolder folderWithCompany = folder; - while (!folderWithCompany.isUseCurrentLevelCompany() && folderWithCompany != null) { + while (!folderWithCompany.isUseCurrentLevelCompany()) { folderWithCompany = folderWithCompany.getParent(); } - - if (folderWithCompany != null) { - companies.add(folderWithCompany.getCompany()); - } + companies.add(folderWithCompany.getCompany()); } fetchCompaniesFromFolders(folders, companies); -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
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 a6ece3dec62eeb55aca165826f933d01710f3b50 Author: jcouteau <couteau@codelutin.com> Date: Thu Sep 27 10:35:03 2018 +0200 Fix potential NPE --- .../com/franciaflex/faxtomail/services/service/EmailServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailServiceImpl.java b/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailServiceImpl.java index 45585460..2b3db67d 100644 --- a/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailServiceImpl.java +++ b/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailServiceImpl.java @@ -1332,9 +1332,9 @@ public class EmailServiceImpl extends FaxToMailServiceSupport implements EmailSe if (result != null) { // force lazy initialize Hibernate.initialize(result); + result = GENERATED_PDF_PAGE_NATURAL_ORDERING.sortedCopy(result); } - result = GENERATED_PDF_PAGE_NATURAL_ORDERING.sortedCopy(result); return result; } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
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 2da46173847edd16f2e72f3a1418be35cee85e98 Author: jcouteau <couteau@codelutin.com> Date: Thu Sep 27 14:28:26 2018 +0200 Really fix hibernate mess --- .../services/service/EmailServiceImpl.java | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailServiceImpl.java b/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailServiceImpl.java index 2b3db67d..dfe02f0a 100644 --- a/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailServiceImpl.java +++ b/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailServiceImpl.java @@ -502,6 +502,7 @@ public class EmailServiceImpl extends FaxToMailServiceSupport implements EmailSe AttachmentFile originalFile = null; AttachmentFile editedFile = null; + Collection<GeneratedPDFPage> pages = null; // dans tout les cas, les pieces jointes courantes de l'attachment prévalent // sur celles en base if (attachment.getOriginalFile() != null) { @@ -515,6 +516,19 @@ public class EmailServiceImpl extends FaxToMailServiceSupport implements EmailSe editedFile = currentAttachment.getEditedFile(); } + if (attachment.getGeneratedPDFPages() != null) { + if (currentAttachment.getGeneratedPDFPages() == null) { + pages = attachment.getGeneratedPDFPages(); + } else { + pages = currentAttachment.getGeneratedPDFPages(); + for (GeneratedPDFPage page:attachment.getGeneratedPDFPages()){ + if (!pages.contains(page)){ + pages.add(page); + } + } + } + } + // copy new data attachmentBinder.copyExcluding(attachment, currentAttachment, Attachment.PROPERTY_EMAIL, @@ -531,8 +545,6 @@ public class EmailServiceImpl extends FaxToMailServiceSupport implements EmailSe currentAttachment.setEditedFile(editedFile); currentAttachment.setOriginalFile(originalFile); - // On ignore les GeneratedPDFPages car elles ne sont jamais modifiées dans l'UI. - // ici les pieces jointes peuvent être sauvegardées sans que les pièces jointes // soit présentes dans les entités car l'ui ne les a pas copiées // pour ne pas les charger inutilement @@ -556,6 +568,9 @@ public class EmailServiceImpl extends FaxToMailServiceSupport implements EmailSe } if (!currentAttachment.isPersisted()) { + //Deal here with new generated pdf pages (Mail import case) + currentAttachment.setGeneratedPDFPages(pages); + // persist using cascade currentAttachment = attachmentTopiaDao.create(currentAttachment); currentAttachments.add(currentAttachment); @@ -563,8 +578,6 @@ public class EmailServiceImpl extends FaxToMailServiceSupport implements EmailSe } else { attachmentTopiaDao.update(currentAttachment); } - - getPersistenceContext().getHibernateSupport().getHibernateSession().flush(); } if (!newFiles.isEmpty()) { -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm