From c4148a5d2bb2f02cc2fbcb0f5771ecb556a8c2f4 Mon Sep 17 00:00:00 2001 From: Gabriele Zigurella Date: Mon, 27 Feb 2023 12:56:45 +0100 Subject: [PATCH] fix: handle null FileEntry on riparaPermessiDocAggiuntive method --- .../src/it/mwg/sismica/bo/util/SismicaUtil.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/SismicaUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/SismicaUtil.java index 8e097fff..390ee5d7 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/SismicaUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/SismicaUtil.java @@ -1624,11 +1624,13 @@ public class SismicaUtil { try { fileEntry = DLAppServiceUtil.getFileEntry(documento.getFileEntryId()); } catch (Exception e) { - // _log.info(e.getClass() + ": " + e.getMessage()); + _log.error(e,e); + } + if(Validator.isNotNull(fileEntry){ + corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, "Pratica " + + pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() + "), " + tipoDocumento + + StringPool.SPACE + documento.getPrimaryKey()); } - corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, "Pratica " - + pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() + "), " + tipoDocumento - + StringPool.SPACE + documento.getPrimaryKey()); } } inizio += SLICE;