@GuardedBy で宣言されているものの、適切な同期構造によりガードされていないフィールドへのアクセスを報告します。
例:
@GuardedBy("this")
void x() {
notify();
}
void y() {
x(); // ガードされていないメソッド呼び出し
}
サポート対象の @GuardedBy アノテーションは以下の通りです。
net.jcip.annotations.GuardedByjavax.annotation.concurrent.GuardedByorg.apache.http.annotation.GuardedBycom.android.annotations.concurrency.GuardedByandroidx.annotation.GuardedBycom.google.errorprone.annotations.concurrent.GuardedBy