Fix Sonar complains
[oam/nf-oam-adopter.git] / ves-nf-oam-adopter / ves-nf-oam-adopter-pm-manager / src / main / java / org / o / ran / oam / nf / oam / adopter / pm / rest / manager / PerformanceManagementRestAgent.java
index 66693fc..c8133f4 100644 (file)
@@ -56,7 +56,7 @@ public final class PerformanceManagementRestAgent implements AutoCloseable {
     }
 
     private long initialDelay() {
-        final ZonedDateTime now = ZonedDateTime.now(zoneId);
+        final var now = ZonedDateTime.now(zoneId);
 
         ZonedDateTime nextRun = now
                 .withHour(synchronizationTimeStart.getHour())
@@ -65,8 +65,7 @@ public final class PerformanceManagementRestAgent implements AutoCloseable {
         if (now.compareTo(nextRun) > 0) {
             nextRun = nextRun.plusSeconds(synchronizationTimeFrequency);
         }
-        final Duration duration = Duration.between(now, nextRun);
-        return duration.getSeconds();
+        return Duration.between(now, nextRun).getSeconds();
     }
 
     public ZoneId getTimeZone() {