Back to Intellij Community

UseIntelliJVirtualThreads

plugins/devkit/devkit-core/resources/inspectionDescriptions/UseIntelliJVirtualThreads.html

2025.3-rc-2419 B
Original Source

Reports usages of Thread.ofVirtual instead of IntelliJVirtualThreads.ofVirtual.

Thread.ofVirtual is a generic Java API for creation of virtual threads that is not suitable for IntelliJ Platform needs.

Quick fix performs replacement with IntelliJVirtualThreads.ofVirtual.

Example:

// bad:
Thread thread = Thread.ofVirtual().start();

//good
Thread thread = IntelliJVirtualThreads.ofVirtual().start();