From 777a2ec2b97d36cbebb1882b48935929ec57cef8 Mon Sep 17 00:00:00 2001 From: Gabriele Zigurella Date: Mon, 27 Feb 2023 13:00:13 +0100 Subject: [PATCH] fix: handle null FileEntry on riparaPermessiDocPratica 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 390ee5d7..b67c2d05 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 @@ -1667,11 +1667,13 @@ public class SismicaUtil { try { fileEntry = DLAppServiceUtil.getFileEntry(documento.getDlFileEntryId()); } 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;