summaryrefslogtreecommitdiffstats
path: root/gui-pdp-monitoring/src
diff options
context:
space:
mode:
authormkidd <michael.kidd@est.tech>2021-03-01 11:13:06 +0000
committermkidd <michael.kidd@est.tech>2021-03-03 20:00:01 +0000
commite5b070acb072d62d7f86e50e51b6b1586b85e307 (patch)
tree9501022bcb1d1f725ac5cadfc577fe44641f16a7 /gui-pdp-monitoring/src
parent4f6e6490aa469135379fd2814326e44652caf52f (diff)
fix code smells and vulnerabilities
used await method inside an if statement that now runs the same code as the accompanying finally block. removed unused variables from ApexContextAlbumEditForm.js refactored vars that were redelared - this was not needed as there were variables of this name within scope added ! operator Issue-ID: POLICY-3095 Signed-off-by: mkidd <michael.kidd@est.tech> Change-Id: Idadf4dd6938be5410fef62140de8b265bbaca138
Diffstat (limited to 'gui-pdp-monitoring/src')
-rw-r--r--gui-pdp-monitoring/src/main/java/org/onap/policy/gui/pdp/monitoring/PdpMonitoringMain.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/gui-pdp-monitoring/src/main/java/org/onap/policy/gui/pdp/monitoring/PdpMonitoringMain.java b/gui-pdp-monitoring/src/main/java/org/onap/policy/gui/pdp/monitoring/PdpMonitoringMain.java
index 2a2355e..4324124 100644
--- a/gui-pdp-monitoring/src/main/java/org/onap/policy/gui/pdp/monitoring/PdpMonitoringMain.java
+++ b/gui-pdp-monitoring/src/main/java/org/onap/policy/gui/pdp/monitoring/PdpMonitoringMain.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation.
+ * Copyright (C) 2020-2021 Nordix Foundation.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -121,7 +121,9 @@ public class PdpMonitoringMain {
// Find out how long is left to wait
long timeRemaining = parameters.getTimeToLive();
if (timeRemaining >= 0) {
- shutdownLatch.await(timeRemaining, TimeUnit.SECONDS);
+ if (!shutdownLatch.await(timeRemaining, TimeUnit.SECONDS)) {
+ shutdown();
+ }
} else {
shutdownLatch.await();
}