Find non-virtual ExecutorService creation

MSAL

Find all places where static java.util.concurrent.Executors method creates a non-virtual java.util.concurrent.ExecutorService. This recipe can be used to search for ExecutorService that can be replaced by a virtual thread executor.

org.openrewrite.java.migrate.lang.FindNonVirtualExecutors
mod run . --recipe=org.openrewrite.java.migrate.lang.FindNonVirtualExecutors

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Find method usages java.util.concurrent.Executors#newCachedThreadPool(..)
  2. Find method usages java.util.concurrent.Executors#newFixedThreadPool(..)
  3. Find method usages java.util.concurrent.Executors#newSingleThreadExecutor(..)
  4. Find method usages java.util.concurrent.Executors#newWorkStealingPool(..)
  5. Find method usages java.util.concurrent.Executors#newScheduledThreadPool(..)
  6. Find method usages java.util.concurrent.Executors#newSingleThreadScheduledExecutor(..)