Skip to content

Commit

Permalink
sanitize file name negli allegati alla fattura elettronica
Browse files Browse the repository at this point in the history
AND
BUG /GestioneUtenteBP/CRUDFatturaPassivaElettronicaBP<BR>java.lang.NullPointerException
	at it.cnr.contab.docamm00.bp.CRUDFatturaPassivaElettronicaBP.save(CRUDFatturaPassivaElettronicaBP.java:583)
  • Loading branch information
mspasiano committed Oct 28, 2015
1 parent 1726ec8 commit 277584e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Expand Up @@ -583,7 +583,8 @@ public void save(ActionContext actioncontext) throws ValidationException,
BusinessProcessException {
for (Object obj : getCrudArchivioAllegati().getDetails()) {
AllegatoFatturaBulk allegatoFatturaBulk = (AllegatoFatturaBulk)obj;
if (allegatoFatturaBulk.getAspectName().equalsIgnoreCase("P:sigla_fatture_attachment:comunicazione_non_registrabilita")) {
if (allegatoFatturaBulk != null && allegatoFatturaBulk.getAspectName() != null &&
allegatoFatturaBulk.getAspectName().equalsIgnoreCase("P:sigla_fatture_attachment:comunicazione_non_registrabilita")) {
((DocumentoEleTestataBulk) getModel()).setFlIrregistrabile("S");
}
}
Expand Down
Expand Up @@ -613,7 +613,7 @@ private void elaboraFattura(FatturaElettronicaType fatturaElettronicaType, BigIn
try {
Map<String, Object> fileProperties = new HashMap<String, Object>();
fileProperties.put(PropertyIds.OBJECT_TYPE_ID, "D:sigla_fatture_attachment:document");
fileProperties.put(PropertyIds.NAME, nomeAllegato);
fileProperties.put(PropertyIds.NAME, cmisService.sanitizeFilename(nomeAllegato));
fileProperties.put(PropertyIds.SECONDARY_OBJECT_TYPE_IDS,
Arrays.asList("P:sigla_commons_aspect:utente_applicativo_sigla"));
fileProperties.put("sigla_commons_aspect:utente_applicativo", "SDI");
Expand Down Expand Up @@ -715,7 +715,7 @@ private void elaboraFattura(FatturaElettronicaType fatturaElettronicaType, BigIn
}
}
/**
* Carico l'ordine di acquisto
* Carico l'ordine di acquistoresponsabile2
*/
List<DocumentoEleAcquistoBulk> acquisti = new ArrayList<DocumentoEleAcquistoBulk>();
if (fatturaElettronicaBody.getDatiGenerali() != null) {
Expand Down

0 comments on commit 277584e

Please sign in to comment.