From 229cdc45318f194ec43dc2f7a64345a6c9d3f9c4 Mon Sep 17 00:00:00 2001 From: Robert von Burg Date: Fri, 16 Oct 2020 11:51:29 +0200 Subject: [PATCH] [Minor] Code cleanup --- .../SimpleDurationExecutionTimer.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/li.strolch.service/src/main/java/li/strolch/execution/SimpleDurationExecutionTimer.java b/li.strolch.service/src/main/java/li/strolch/execution/SimpleDurationExecutionTimer.java index cc8d33dae..b52221bf7 100644 --- a/li.strolch.service/src/main/java/li/strolch/execution/SimpleDurationExecutionTimer.java +++ b/li.strolch.service/src/main/java/li/strolch/execution/SimpleDurationExecutionTimer.java @@ -12,11 +12,11 @@ import java.util.concurrent.TimeUnit; import li.strolch.agent.api.ComponentContainer; import li.strolch.agent.api.StrolchAgent; +import li.strolch.handler.operationslog.OperationsLog; +import li.strolch.model.Locator; import li.strolch.model.log.LogMessage; import li.strolch.model.log.LogMessageState; import li.strolch.model.log.LogSeverity; -import li.strolch.handler.operationslog.OperationsLog; -import li.strolch.model.Locator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -24,9 +24,9 @@ public class SimpleDurationExecutionTimer implements DelayedExecutionTimer { private static final Logger logger = LoggerFactory.getLogger(SimpleDurationExecutionTimer.class); - private Map> simulationTasks; + private final Map> simulationTasks; - private StrolchAgent agent; + private final StrolchAgent agent; public SimpleDurationExecutionTimer(StrolchAgent agent) { this.agent = agent; @@ -89,17 +89,17 @@ public class SimpleDurationExecutionTimer implements DelayedExecutionTimer { if (this.agent.getContainer().hasComponent(OperationsLog.class)) { this.agent.getContainer().getComponent(OperationsLog.class).addMessage( new LogMessage(realm, SYSTEM_USER_AGENT, locator, LogSeverity.Exception, - LogMessageState.Information, ResourceBundle.getBundle("strolch-service"), "execution.handler.failed.executed") - .withException(e).value("reason", e)); + LogMessageState.Information, ResourceBundle.getBundle("strolch-service"), + "execution.handler.failed.executed").withException(e).value("reason", e)); } } } private class SimulationTask implements Runnable { - private String realm; - private ComponentContainer container; - private Locator locator; + private final String realm; + private final ComponentContainer container; + private final Locator locator; public SimulationTask(String realm, ComponentContainer container, Locator locator) { this.realm = realm;