summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshrek2000 <oren.kleks@amdocs.com>2019-11-28 10:59:30 +0200
committershrek2000 <oren.kleks@amdocs.com>2019-11-28 10:59:30 +0200
commit7b089c09caf5c112fe6f3f538ddc6902b79ce384 (patch)
tree8c9b07ec16e95f1f4fbb117f4ee05de9e49c8a54
parentc49ad1c995d0cf58ce4a1a99ad635ecc29f8b2a9 (diff)
Fix Sonar issues
When arithmetic is performed on integers, the result will always be an integer. You can assign that result to a long, double, or float with automatic type conversion, but having started as an int or long, the result will likely not be what you expect. For instance, if the result of int division is assigned to a floating-point variable, precision will have been lost before the assignment. Likewise, if the result of multiplication is assigned to a long, it may have already overflowed before the assignment. In either case, the result will not be what was expected. Instead, at least one operand should be cast or promoted to the final type before the operation takes place. Issue-ID: SDC-2690 Signed-off-by: shrek2000 <oren.kleks@amdocs.com> Change-Id: I3ef06e48b02a73753a824076d3a9de8b585f2917
-rw-r--r--security-util-lib/src/main/java/org/onap/sdc/security/filters/SampleFilter.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/security-util-lib/src/main/java/org/onap/sdc/security/filters/SampleFilter.java b/security-util-lib/src/main/java/org/onap/sdc/security/filters/SampleFilter.java
index 853c40d..0578c1d 100644
--- a/security-util-lib/src/main/java/org/onap/sdc/security/filters/SampleFilter.java
+++ b/security-util-lib/src/main/java/org/onap/sdc/security/filters/SampleFilter.java
@@ -38,8 +38,8 @@ public class SampleFilter extends SessionValidationFilter {
private static class Configuration implements ISessionValidationFilterConfiguration {
private String securityKey = "AGLDdG4D04BKm2IxIWEr8o==";
- private long maxSessionTimeOut = 24*60*60*1000;
- private long sessionIdleTimeOut = 60*60*1000;
+ private long maxSessionTimeOut = 24*60*60*1_000L;
+ private long sessionIdleTimeOut = 60*60*1_000L;
private String redirectURL = "http://portal.api.simpledemo.onap.org:8989/ECOMPPORTAL/login.htm";
private List<String> excludedUrls = new ArrayList<>(Arrays.asList("/config","/configmgr","/rest","/kibanaProxy","/healthcheck","/upload.*"));
private String cookieName = "kuku";