[Minor] Code cleanup

This commit is contained in:
Robert von Burg 2023-06-06 14:30:47 +02:00
parent 31a45c1a6b
commit d82d3c2795
Signed by: eitch
GPG Key ID: 75DB9C85C74331F7
1 changed files with 13 additions and 12 deletions

View File

@ -15,17 +15,6 @@
*/
package li.strolch.agent.impl;
import static li.strolch.model.Tags.AGENT;
import static li.strolch.runtime.StrolchConstants.*;
import static li.strolch.runtime.configuration.RuntimeConfiguration.PROP_TIMEZONE;
import static li.strolch.utils.helper.StringHelper.formatNanoDuration;
import static li.strolch.utils.helper.StringHelper.isEmpty;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.text.MessageFormat;
import java.util.*;
import li.strolch.agent.api.*;
import li.strolch.exception.StrolchException;
import li.strolch.handler.operationslog.OperationsLog;
@ -44,6 +33,18 @@ import li.strolch.utils.helper.SystemHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.text.MessageFormat;
import java.util.*;
import static li.strolch.model.Tags.AGENT;
import static li.strolch.runtime.StrolchConstants.*;
import static li.strolch.runtime.configuration.RuntimeConfiguration.PROP_TIMEZONE;
import static li.strolch.utils.helper.ExceptionHelper.getRootCauseMessage;
import static li.strolch.utils.helper.StringHelper.formatNanoDuration;
import static li.strolch.utils.helper.StringHelper.isEmpty;
public class ComponentContainerImpl implements ComponentContainer {
private static final Logger logger = LoggerFactory.getLogger(ComponentContainerImpl.class);
@ -193,7 +194,7 @@ public class ComponentContainerImpl implements ComponentContainer {
IllegalArgumentException | InvocationTargetException e) {
String msg = "Could not load class for component {0} due to: {1}";
msg = MessageFormat.format(msg, componentName, e.getMessage());
msg = MessageFormat.format(msg, componentName, getRootCauseMessage(e));
throw new StrolchConfigurationException(msg, e);
}
}