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/domains/onap/vcpe/AaiAndGuardSim.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'examples/examples-onap-vcpe/src') diff --git a/examples/examples-onap-vcpe/src/test/java/org/onap/policy/apex/domains/onap/vcpe/AaiAndGuardSim.java b/examples/examples-onap-vcpe/src/test/java/org/onap/policy/apex/domains/onap/vcpe/AaiAndGuardSim.java index 369e6172c..bb754d99f 100644 --- a/examples/examples-onap-vcpe/src/test/java/org/onap/policy/apex/domains/onap/vcpe/AaiAndGuardSim.java +++ b/examples/examples-onap-vcpe/src/test/java/org/onap/policy/apex/domains/onap/vcpe/AaiAndGuardSim.java @@ -32,6 +32,7 @@ import org.onap.policy.apex.core.infrastructure.threading.ThreadUtilities; */ public class AaiAndGuardSim { private static final String BASE_URI = "http://localhost:54321/AAIAndGuardSim"; + private static final int MAX_LOOPS = 100000; private HttpServer server; /** @@ -64,13 +65,10 @@ public class AaiAndGuardSim { public static void main(final String[] args) throws Exception { final AaiAndGuardSim sim = new AaiAndGuardSim(); - while (true) { - try { - Thread.sleep(100); - } catch (final InterruptedException e) { - break; - } + for (int index = 0; index < MAX_LOOPS; index++) { + ThreadUtilities.sleep(100); } + sim.tearDown(); } } -- cgit 1.2.3-korg