From 82c84075c71e285d1009bbe7e183ad2f0358d335 Mon Sep 17 00:00:00 2001 From: Parshad Patel Date: Tue, 27 Nov 2018 15:36:08 +0900 Subject: Fix critical sonar issues Fix rethrow the "InterruptedException" and Use "isAssignableFrom" sonar issues Issue-ID: SDC-1895 Change-Id: I2cadc08b9e7acdc84cf25a3ce9d22199711afa5d Signed-off-by: Parshad Patel --- .../openecomp/sdc/common/datastructure/FunctionalInterfaces.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'common-app-api/src/main') diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/datastructure/FunctionalInterfaces.java b/common-app-api/src/main/java/org/openecomp/sdc/common/datastructure/FunctionalInterfaces.java index 3f6fb4c298..e66af77648 100644 --- a/common-app-api/src/main/java/org/openecomp/sdc/common/datastructure/FunctionalInterfaces.java +++ b/common-app-api/src/main/java/org/openecomp/sdc/common/datastructure/FunctionalInterfaces.java @@ -491,7 +491,11 @@ public class FunctionalInterfaces { try { T calcValue = future.get(timeoutInMs, TimeUnit.MILLISECONDS); result = Either.left(calcValue); - } catch (InterruptedException | ExecutionException | TimeoutException e) { + } catch (InterruptedException e) { + LOGGER.debug("InterruptedException in runMethodWithTimeOut", e); + Thread.currentThread().interrupt(); + result = Either.right(false); + } catch (ExecutionException | TimeoutException e) { LOGGER.debug("method run was canceled because it has passed its time limit of {} MS", timeoutInMs, e); result = Either.right(false); } finally { -- cgit 1.2.3-korg ARCHIVED- 2022-02-15 at the request of the projectGrokmirror user
aboutsummaryrefslogtreecommitdiffstats
blob: d4300801de9b8935fdb7783ee067d474da1779ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50