summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-common
diff options
context:
space:
mode:
authorArundathi Patil <arundpil@in.ibm.com>2018-08-24 23:01:27 +0530
committerIBM602-PC0F1E3C\Arundathi <arundpil@in.ibm.com>2018-08-24 23:01:43 +0530
commitca834584907e4ffe355b80bfd55f04a6225e52d6 (patch)
tree4f7580d6d088bdb489aa35e8bddf061a11aa4578 /ecomp-portal-BE-common
parent3456ee097bc42c929f20d8bf530930f223dd6ff9 (diff)
NotificationCleanupConfig.java - Fixed sonar issue
Fixed below sonar issues: Cast one of the operands of multiplication operation to long, Remove the BeansException which is runtime, Reorder the modifiers to comply with java language specification Issue-ID: PORTAL-378 Change-Id: I5cede6e6d12e9a16b524beeb562d379b3d991d93 Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
Diffstat (limited to 'ecomp-portal-BE-common')
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/onap/portalapp/config/NotificationCleanupConfig.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/config/NotificationCleanupConfig.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/config/NotificationCleanupConfig.java
index 13b86995..b9f46492 100644
--- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/config/NotificationCleanupConfig.java
+++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/config/NotificationCleanupConfig.java
@@ -3,6 +3,8 @@
* ONAP Portal
* ===================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ *
+ * Modifications Copyright (C) 2018 IBM.
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
@@ -52,11 +54,11 @@ import org.springframework.context.annotation.Configuration;
public class NotificationCleanupConfig implements ApplicationContextAware {
// Once every 10 minutes should be adequate
- public final static int CLEANUP_PERIOD_MINUTES = 10;
+ public static final int CLEANUP_PERIOD_MINUTES = 10;
private static ApplicationContext applicationContext;
- public void setApplicationContext(ApplicationContext context) throws BeansException {
+ public void setApplicationContext(ApplicationContext context) {
applicationContext = context;
}
@@ -69,7 +71,7 @@ public class NotificationCleanupConfig implements ApplicationContextAware {
public void StartSchedular() {
TimerTask task = new NotificationCleanup();
Timer timer = new Timer();
- timer.schedule(task, 1000, CLEANUP_PERIOD_MINUTES * 60 * 1000);
+ timer.schedule(task, 1000, (long) CLEANUP_PERIOD_MINUTES * 60 * 1000);
}
@Bean