From dfc3df582100fcd4f3c51ee160d18465a0ba0193 Mon Sep 17 00:00:00 2001 From: Luca Roffia Date: Wed, 16 Jun 2021 09:24:16 +0200 Subject: [PATCH] avoid null notification propagation from SPU --- .../engine/processing/subscriptions/SPU.java | 6 ++++-- engine/src/main/resources/log4j2.xml | 20 +++++++------------ 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/engine/src/main/java/it/unibo/arces/wot/sepa/engine/processing/subscriptions/SPU.java b/engine/src/main/java/it/unibo/arces/wot/sepa/engine/processing/subscriptions/SPU.java index ea1d4276..7c19538d 100644 --- a/engine/src/main/java/it/unibo/arces/wot/sepa/engine/processing/subscriptions/SPU.java +++ b/engine/src/main/java/it/unibo/arces/wot/sepa/engine/processing/subscriptions/SPU.java @@ -185,8 +185,10 @@ public void run() { logger.log(Level.getLevel("spu"), "* POST PROCESSING *"); try { Notification notify = postUpdateInternalProcessing((UpdateResponse) response); - logger.log(Level.getLevel("spu"), "notifyEvent"); - manager.notifyEvent(notify); + if (notify != null) { + logger.log(Level.getLevel("spu"), "notifyEvent"); + manager.notifyEvent(notify); + } } catch (SEPAProcessingException e) { SPUManagerBeans.postProcessingException(); logger.error(e.getMessage()); diff --git a/engine/src/main/resources/log4j2.xml b/engine/src/main/resources/log4j2.xml index f9ee38c0..49b9d821 100644 --- a/engine/src/main/resources/log4j2.xml +++ b/engine/src/main/resources/log4j2.xml @@ -1,15 +1,8 @@ - + @@ -23,14 +16,15 @@ - - + + - + - + \ No newline at end of file