- Operating system: OS Windows 11(amd64) v10.0 , screens 1920.0x1080.0, 1920.0x1080.0
- SonarLint plugin version: 10.2.0.77238
- Programming language you’re coding in: java
- Idea version: 2023.3.2 IU-233.13135.103
And a thorough description of the problem / question:
Rule java:S1143 Exception recognized! As shown in the picture:
void test() {
try {
// do
}
finally {
ThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(1);
executor.submit(() -> {
if (executor.getActiveCount() < 1000) {
return;
}
// do other
executor.shutdown();
});
}
}