aboutsummaryrefslogtreecommitdiffstats
path: root/appc-metric/appc-metric-bundle
diff options
context:
space:
mode:
authorburdziak <olaf.burdziakowski@nokia.com>2018-01-25 14:18:47 +0100
committerPatrick Brady <pb071s@att.com>2018-01-25 19:04:33 +0000
commitc49370a99c5e1ae0c944e45936d289c7303aed92 (patch)
tree3ee47d293132daa580dcf0c23ec45eb87564cc1c /appc-metric/appc-metric-bundle
parent331a0c05382516535755f179a29ced7a4924139d (diff)
Fixes in ScheduledPublishingPolicyImpl
Change-Id: I2055da6942f0487ed543df260ee541632cff6f5e Issue-ID: APPC-515 Signed-off-by: burdziak <olaf.burdziakowski@nokia.com>
Diffstat (limited to 'appc-metric/appc-metric-bundle')
-rw-r--r--appc-metric/appc-metric-bundle/src/main/java/org/onap/appc/metricservice/policy/impl/ScheduledPublishingPolicyImpl.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/appc-metric/appc-metric-bundle/src/main/java/org/onap/appc/metricservice/policy/impl/ScheduledPublishingPolicyImpl.java b/appc-metric/appc-metric-bundle/src/main/java/org/onap/appc/metricservice/policy/impl/ScheduledPublishingPolicyImpl.java
index 8933150f3..84bc011a2 100644
--- a/appc-metric/appc-metric-bundle/src/main/java/org/onap/appc/metricservice/policy/impl/ScheduledPublishingPolicyImpl.java
+++ b/appc-metric/appc-metric-bundle/src/main/java/org/onap/appc/metricservice/policy/impl/ScheduledPublishingPolicyImpl.java
@@ -77,7 +77,7 @@ public class ScheduledPublishingPolicyImpl implements ScheduledPublishingPolicy
}else if(properties.getProperty("schedule.policy.metric.period")==null && properties.getProperty("schedule.policy.metric.start.time")!=null){
this.startTime=getConfigStartTime("00:00:00",properties);
- this.period=(24*60*60*1000)-1;
+ this.period=(24*60*60*1000l)-1;
logger.info("Metric Properties read from configuration Start Time :"+this.startTime+", Period :"+this.period);
}else{
@@ -101,7 +101,7 @@ public class ScheduledPublishingPolicyImpl implements ScheduledPublishingPolicy
private long getConfigPeriod(Properties properties) {
String period=properties.getProperty("schedule.policy.metric.period");
logger.info("Metric period : " +period);
- long periodInMs=Integer.parseInt(period)*1000;
+ long periodInMs=Integer.parseInt(period)*1000l;
logger.info("Metric period in long : " +periodInMs);
return periodInMs;
}
@@ -109,9 +109,9 @@ public class ScheduledPublishingPolicyImpl implements ScheduledPublishingPolicy
private long getTimeInMs(String time) {
String[] strings=time.split(":");
if(strings.length==3) {
- long hour = Integer.parseInt(strings[0]) * 60 * 60 * 1000;
- long min = Integer.parseInt(strings[1]) * 60 * 1000;
- long sec = Integer.parseInt(strings[2]) * 1000;
+ long hour = Integer.parseInt(strings[0]) * 60 * 60 * 1000l;
+ long min = Integer.parseInt(strings[1]) * 60 * 1000l;
+ long sec = Integer.parseInt(strings[2]) * 1000l;
return hour+min+sec;
}else{
return 0;