From a65e4772f4557a109917532b2d9c49680ce3bb15 Mon Sep 17 00:00:00 2001 From: liamfallon Date: Fri, 14 Sep 2018 16:45:06 +0100 Subject: Fix exception not logged or rethrown Eclipse sonarlint does not check for exception dropping by default, it must be configured. This commit addresses exception dropping in apex. Change-Id: I406838990b3424c2912124b25d7326502cacc96c Issue-ID: POLICY-1034 Signed-off-by: liamfallon --- .../org/onap/policy/apex/examples/aadm/TestApexActionListener.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'examples/examples-aadm/src') diff --git a/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestApexActionListener.java b/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestApexActionListener.java index ccf4539aa..60fa169dd 100644 --- a/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestApexActionListener.java +++ b/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestApexActionListener.java @@ -69,11 +69,8 @@ public class TestApexActionListener implements EnEventListener { */ @Override public void onEnEvent(final EnEvent actionEvent) { - try { - Thread.sleep(100); - } catch (final InterruptedException e) { - e.printStackTrace(); - } + ThreadUtilities.sleep(100); + if (actionEvent != null) { System.out.println("Action event from engine:" + actionEvent.getName()); resultEvents.add(actionEvent); -- cgit 1.2.3-korg