tillrohrmann commented on a change in pull request #14923: URL: https://github.com/apache/flink/pull/14923#discussion_r577023374
########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/declarative/DeclarativeScheduler.java ########## @@ -887,19 +897,22 @@ public void runIfState(State expectedState, Runnable action, Duration delay) { // ---------------------------------------------------------------- - private void transitionToState(State newState) { - if (state != newState) { - LOG.debug( - "Transition from state {} to {}.", - state.getClass().getSimpleName(), - newState.getClass().getSimpleName()); + @VisibleForTesting + <S extends State> void transitionToState( + Supplier<S> stateTransition, Class<S> targetStateClass) { Review comment: Maybe we can combine these two parameters into something like a `StateFactory` which allows to create a state and ask for the new state's type? That way they would be bundled because they belong together. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org