Remove 'final' from ExecutorService declarations

This commit is contained in:
Jacob Stopak 2019-05-18 22:06:36 -07:00
parent 768b82eec3
commit d67dd3cb5b
1 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ public class Delay {
private static void delayedServiceTask(Integer delayInSeconds) {
final ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor();
ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor();
executorService.schedule(Delay::someTask1, delayInSeconds, TimeUnit.SECONDS);
@ -65,7 +65,7 @@ public class Delay {
private static void fixedRateServiceTask(Integer delayInSeconds) {
final ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor();
ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor();
ScheduledFuture<?> sf = executorService.scheduleAtFixedRate(Delay::someTask2, 0, delayInSeconds,
TimeUnit.SECONDS);