From 6345d3715505dd10a0b8896ff8802b721e637d1c Mon Sep 17 00:00:00 2001 From: Robert von Burg Date: Fri, 5 Jun 2020 15:44:57 +0200 Subject: [PATCH] [Minor] code cleanup --- .../java/li/strolch/execution/policy/ExecutionPolicy.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/li.strolch.service/src/main/java/li/strolch/execution/policy/ExecutionPolicy.java b/li.strolch.service/src/main/java/li/strolch/execution/policy/ExecutionPolicy.java index 81396505a..9ff815c53 100644 --- a/li.strolch.service/src/main/java/li/strolch/execution/policy/ExecutionPolicy.java +++ b/li.strolch.service/src/main/java/li/strolch/execution/policy/ExecutionPolicy.java @@ -1,5 +1,6 @@ package li.strolch.execution.policy; +import static li.strolch.runtime.StrolchConstants.SYSTEM_USER_AGENT; import static li.strolch.utils.helper.StringHelper.formatMillisecondsDuration; import java.time.Duration; @@ -281,7 +282,7 @@ public abstract class ExecutionPolicy extends StrolchPolicy { * if anything else goes wrong during execution */ protected void runAsAgent(PrivilegedRunnable runnable) throws PrivilegeException, Exception { - getContainer().getPrivilegeHandler().runAs(StrolchConstants.SYSTEM_USER_AGENT, runnable); + getContainer().getPrivilegeHandler().runAs(SYSTEM_USER_AGENT, runnable); } /** @@ -300,6 +301,6 @@ public abstract class ExecutionPolicy extends StrolchPolicy { */ protected T runAsAgentWithResult(PrivilegedRunnableWithResult runnable) throws PrivilegeException, Exception { - return getContainer().getPrivilegeHandler().runWithResult(StrolchConstants.SYSTEM_USER_AGENT, runnable); + return getContainer().getPrivilegeHandler().runWithResult(SYSTEM_USER_AGENT, runnable); } }