[jira] [Created] (FLINK-16503) Don't assign ScheduledExecutorService into variables of ExecutorService or Executor types

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-16503) Don't assign ScheduledExecutorService into variables of ExecutorService or Executor types

Shang Yuanchun (Jira)
Roman Leventov created FLINK-16503:
--------------------------------------

             Summary: Don't assign ScheduledExecutorService into variables of ExecutorService or Executor types
                 Key: FLINK-16503
                 URL: https://issues.apache.org/jira/browse/FLINK-16503
             Project: Flink
          Issue Type: Improvement
            Reporter: Roman Leventov


There is an unnecessary efficiency cost to assigning ScheduledExecutorService (typically, ScheduledThreadPoolExecutor) into variables of ExecutorService or Executor types.

Currently, there is one such occurrence in production code, inĀ TaskManagerRunner, and three more in tests.

They could be found using IntelliJ's Structural search pattern (and Structural Search inspection):

{{$x$ = $y$;}}

Where the Type of {{$x$}} is set to {{ExecutorService|Executor}} ("within type hierarchy" checkbox is off), and the Type of {{$y$}} is set to {{ScheduledThreadPoolExecutor}} ("within type hierarchy" checkbox is on).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)