From 61b27e147b5d8d816488b3a5a5dc1d57a1539186 Mon Sep 17 00:00:00 2001 From: jhh Date: Mon, 10 May 2021 17:13:57 -0500 Subject: interrupted exception and var usage sonars Issue-ID: POLICY-3230 Signed-off-by: jhh Change-Id: I50a4ee81f0a1c97df25732a4e4507e8b7f8c8e4d --- .../src/main/java/org/onap/policy/drools/core/PolicySession.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'policy-core/src/main') diff --git a/policy-core/src/main/java/org/onap/policy/drools/core/PolicySession.java b/policy-core/src/main/java/org/onap/policy/drools/core/PolicySession.java index 389d5b37..fb17b10a 100644 --- a/policy-core/src/main/java/org/onap/policy/drools/core/PolicySession.java +++ b/policy-core/src/main/java/org/onap/policy/drools/core/PolicySession.java @@ -1,8 +1,8 @@ /* * ============LICENSE_START======================================================= - * policy-core + * ONAP * ================================================================================ - * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved. * Modifications Copyright (C) 2018 Samsung Electronics Co., Ltd. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -469,8 +469,9 @@ public class PolicySession // one more interrupt, just in case the 'kieSession.halt()' // didn't work for some reason thread.interrupt(); - } catch (Exception e) { + } catch (InterruptedException e) { logger.error("stopThread in thread.join error", e); + Thread.currentThread().interrupt(); } } @@ -497,7 +498,7 @@ public class PolicySession // We want to continue looping, despite any exceptions that occur // while rules are fired. - KieSession kieSession1 = session.getKieSession(); + var kieSession1 = session.getKieSession(); while (repeat) { try { kieSession1.fireUntilHalt(); -- cgit 1.2.3-korg