Github user pnowojski commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5239#discussion_r160940119
  
    --- Diff: 
flink-runtime/src/test/java/org/apache/flink/runtime/operators/testutils/DummyEnvironment.java
 ---
    @@ -53,10 +54,15 @@
        private final ExecutionConfig executionConfig = new ExecutionConfig();
        private final TaskInfo taskInfo;
        private KvStateRegistry kvStateRegistry = new KvStateRegistry();
    +   private TaskStateManager taskStateManager;
    --- End diff --
    
    Can not this variable be made final and set in the constructor? From what I 
have checked in the usages it seems like it could be so, since all use cases 
are:
    ```
    {
        TaskStateManager taskStateManager = ....;
        // (...)
        DummyEnvironment environment = new DummyEnvironment(...);
        // (...)
        environment. setTaskStateManager(taskStateManager);
    }
    ```


---

Reply via email to