diff --git a/spring-statemachine-core/src/main/java/org/springframework/statemachine/config/AbstractStateMachineFactory.java b/spring-statemachine-core/src/main/java/org/springframework/statemachine/config/AbstractStateMachineFactory.java index dbd61d0a..85df3046 100644 --- a/spring-statemachine-core/src/main/java/org/springframework/statemachine/config/AbstractStateMachineFactory.java +++ b/spring-statemachine-core/src/main/java/org/springframework/statemachine/config/AbstractStateMachineFactory.java @@ -349,7 +349,7 @@ public abstract class AbstractStateMachineFactory extends LifecycleObjectS for (final StateMachineInterceptor interceptor : interceptors) { // add persisting interceptor hooks to all regions - RegionPersistingInterceptorAdapter adapter = new RegionPersistingInterceptorAdapter<>(interceptor, machine); + RegionPersistingInterceptorAdapter adapter = new RegionPersistingInterceptorAdapter<>(interceptor); machine.getStateMachineAccessor().doWithAllRegions(function -> function.addStateMachineInterceptor(adapter)); } } @@ -366,11 +366,9 @@ public abstract class AbstractStateMachineFactory extends LifecycleObjectS private static class RegionPersistingInterceptorAdapter extends StateMachineInterceptorAdapter { private final StateMachineInterceptor interceptor; - private final StateMachine rootStateMachine; - public RegionPersistingInterceptorAdapter(StateMachineInterceptor interceptor, StateMachine rootStateMachine) { + public RegionPersistingInterceptorAdapter(StateMachineInterceptor interceptor) { this.interceptor = interceptor; - this.rootStateMachine = rootStateMachine; } @Override diff --git a/spring-statemachine-core/src/main/java/org/springframework/statemachine/support/StateMachineInterceptorList.java b/spring-statemachine-core/src/main/java/org/springframework/statemachine/support/StateMachineInterceptorList.java index b159f75f..aa361b4a 100644 --- a/spring-statemachine-core/src/main/java/org/springframework/statemachine/support/StateMachineInterceptorList.java +++ b/spring-statemachine-core/src/main/java/org/springframework/statemachine/support/StateMachineInterceptorList.java @@ -96,7 +96,6 @@ public class StateMachineInterceptorList { * @param stateMachine the state machine * @param rootStateMachine the root state machine */ - @SuppressWarnings({ "deprecation" }) public void preStateChange(State state, Message message, Transition transition, StateMachine stateMachine, StateMachine rootStateMachine) { for (StateMachineInterceptor interceptor : interceptors) { @@ -113,7 +112,6 @@ public class StateMachineInterceptorList { * @param stateMachine the state machine * @param rootStateMachine the root state machine */ - @SuppressWarnings({ "deprecation" }) public void postStateChange(State state, Message message, Transition transition, StateMachine stateMachine, StateMachine rootStateMachine) { for (StateMachineInterceptor interceptor : interceptors) {