[Minor] Automated Code cleanup: Casting 'rootElement' to '' may produce 'ClassCastException'

This commit is contained in:
Robert von Burg 2023-04-04 14:45:39 +02:00
parent 4160837ab6
commit 3c08be1314
Signed by: eitch
GPG Key ID: 75DB9C85C74331F7
1 changed files with 1 additions and 1 deletions

View File

@ -560,7 +560,7 @@ public abstract class AbstractTransaction implements StrolchTransaction {
throw new StrolchModelException(MessageFormat.format(msg, locator)); throw new StrolchModelException(MessageFormat.format(msg, locator));
} }
Resource resource = (Resource) rootElement; Resource resource = rootElement.asResource();
String stateId = elements.get(4); String stateId = elements.get(4);
StrolchTimedState<IValue<?>> timedState = resource.getTimedState(stateId); StrolchTimedState<IValue<?>> timedState = resource.getTimedState(stateId);