Rule not detected RSPEC-6906

Hi Team,

This code appears to contain the bug described by SonarQube in RSPEC-6906, but SonarQube does not detect that bug. Please, can you review?

import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
class VirtualThreadBug {
    private final Lock lock = new ReentrantLock();
    void enqueue() {
        Thread.startVirtualThread(() -> { 
            lock.lock();
            setupOperations();
            dequeLogic();
           lock.unlock();
        });
    }
    void setupOperations() {
        // setup operations
    }
    void dequeLogic() {
        // deque logic
    }
    public void showBug() {
        enqueue();
    }
}

screenshot of scan result

Sonarqube version 25.5
Lang: Java
SonarScanner version: 5.0.1.3006

Hey there.

Is this Java 24 code? I think this might have been fixed with SONARJAVA-5443, which should ship in next month’s Community Build release (v25.7).