diff options
author | jhh <jorge.hernandez-herrero@att.com> | 2021-05-10 17:13:57 -0500 |
---|---|---|
committer | jhh <jorge.hernandez-herrero@att.com> | 2021-05-10 17:13:57 -0500 |
commit | 61b27e147b5d8d816488b3a5a5dc1d57a1539186 (patch) | |
tree | 8c3269d5423f6b827526018f4d0a90467701bc67 /policy-core | |
parent | 534201ccd5b6d3bbb115c7021b881594efef405e (diff) |
interrupted exception and var usage sonars
Issue-ID: POLICY-3230
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I50a4ee81f0a1c97df25732a4e4507e8b7f8c8e4d
Diffstat (limited to 'policy-core')
-rw-r--r-- | policy-core/src/main/java/org/onap/policy/drools/core/PolicySession.java | 9 |
1 files changed, 5 insertions, 4 deletions
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(); |