mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[blocking calls detection] IDEA-310256: handle implicit constructor calls
GitOrigin-RevId: d550a9ad10d014116378fd4800cff7b72b7b51c1
This commit is contained in:
committed by
intellij-monorepo-bot
parent
573f7f3268
commit
1555d664b6
+35
@@ -0,0 +1,35 @@
|
||||
import org.jetbrains.annotations.Blocking;
|
||||
import org.jetbrains.annotations.NonBlocking;
|
||||
|
||||
public class TestBlockingConstructor {
|
||||
static class BlockingConstructor {
|
||||
@Blocking
|
||||
BlockingConstructor() {
|
||||
}
|
||||
|
||||
@Blocking
|
||||
BlockingConstructor(String url) {
|
||||
}
|
||||
}
|
||||
|
||||
static class Intermediate extends BlockingConstructor {}
|
||||
|
||||
static class NonBlockingConstructor extends BlockingConstructor {
|
||||
@NonBlocking
|
||||
<warning descr="Possibly blocking call from implicit constructor call in non-blocking context could lead to thread starvation">NonBlockingConstructor</warning>() {
|
||||
|
||||
}
|
||||
|
||||
@NonBlocking
|
||||
NonBlockingConstructor(String url) {
|
||||
<warning descr="Possibly blocking call in non-blocking context could lead to thread starvation">super</warning>(url);
|
||||
}
|
||||
}
|
||||
|
||||
static class NonBlockingConstructorIntermediate extends Intermediate {
|
||||
@NonBlocking
|
||||
<warning descr="Possibly blocking call from implicit constructor call in non-blocking context could lead to thread starvation">NonBlockingConstructorIntermediate</warning>() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user