diff --git a/java/java-impl/src/inspectionDescriptions/FieldAccessNotGuarded.html b/java/java-impl/src/inspectionDescriptions/FieldAccessNotGuarded.html index ae1334982042..7db12f496b9c 100644 --- a/java/java-impl/src/inspectionDescriptions/FieldAccessNotGuarded.html +++ b/java/java-impl/src/inspectionDescriptions/FieldAccessNotGuarded.html @@ -1,13 +1,14 @@ -Reports any accesses of fields declared as @GuardedBy which are are not guarded by an appropriate synchronization structure. -Supported annotations are: +Reports accesses of fields declared as @GuardedBy which are are not guarded by an appropriate synchronization structure. +Supported @GuardedBy annotations are: \ No newline at end of file diff --git a/java/java-impl/src/inspectionDescriptions/InstanceGuardedByStatic.html b/java/java-impl/src/inspectionDescriptions/InstanceGuardedByStatic.html index 8cd1f7a499ba..db392dbf745a 100644 --- a/java/java-impl/src/inspectionDescriptions/InstanceGuardedByStatic.html +++ b/java/java-impl/src/inspectionDescriptions/InstanceGuardedByStatic.html @@ -1,7 +1,16 @@ - Reports any @GuardedBy annotations (net.jcip.annotations|javax.annotation.concurrent|org.apache.http.annotation) on instance fields or methods, - where the guard is a static field. Guarding a non-static by a static may result in excessive lock contention, - as access to each locked field in any object instance will prevent simultaneous access to that field in every object instance. +Reports @GuardedBy annotations on instance fields or methods, +where the guard is a static field. Guarding a non-static by a static may result in excessive lock contention, +as access to each locked field in any object instance will prevent simultaneous access to that field in every object instance. +Supported @GuardedBy annotations are: + \ No newline at end of file diff --git a/java/java-impl/src/inspectionDescriptions/NonFinalFieldInImmutable.html b/java/java-impl/src/inspectionDescriptions/NonFinalFieldInImmutable.html index 59c3d65cba0b..ad8e223f7a46 100644 --- a/java/java-impl/src/inspectionDescriptions/NonFinalFieldInImmutable.html +++ b/java/java-impl/src/inspectionDescriptions/NonFinalFieldInImmutable.html @@ -1,6 +1,15 @@ - Reports any non-final field in a class with @Immutable annotation - (net.jcip.annotations|javax.annotation.concurrent|org.apache.http.annotation). This violates the contract of the @Immutable annotation. +Reports any non-final field in a class with @Immutable annotation. +This violates the contract of the @Immutable annotation. +Supported @GuardedBy annotations are: + \ No newline at end of file diff --git a/java/java-impl/src/inspectionDescriptions/NonFinalGuard.html b/java/java-impl/src/inspectionDescriptions/NonFinalGuard.html index 6eabea1395e3..321e28adc140 100644 --- a/java/java-impl/src/inspectionDescriptions/NonFinalGuard.html +++ b/java/java-impl/src/inspectionDescriptions/NonFinalGuard.html @@ -1,7 +1,16 @@ - Reports any @GuardedBy annotations (net.jcip.annotations|javax.annotation.concurrent|org.apache.http.annotation) annotations where the guarding field - is not final. Guarding on a non-final field may result in unexpected race conditions, as locks will - be held on the value of the field (which may change), rather than the field itself. +Reports @GuardedBy annotations annotations where the guarding field +is not final. Guarding on a non-final field may result in unexpected race conditions, as locks will +be held on the value of the field (which may change), rather than the field itself. +Supported @GuardedBy annotations are: + \ No newline at end of file diff --git a/java/java-impl/src/inspectionDescriptions/StaticGuardedByInstance.html b/java/java-impl/src/inspectionDescriptions/StaticGuardedByInstance.html index dd818315e95e..21ede5059eb4 100644 --- a/java/java-impl/src/inspectionDescriptions/StaticGuardedByInstance.html +++ b/java/java-impl/src/inspectionDescriptions/StaticGuardedByInstance.html @@ -1,7 +1,16 @@ - Reports any @GuardedBy annotations (net.jcip.annotations|javax.annotation.concurrent|org.apache.http.annotation) on static fields or methods, - where the guard is either a non-static field or 'this'. Guarding a static by a non-static may result in - excessive concurrency, multiple threads may be able to access the guarded field simultaneously, by locking in different object contexts. +Reports @GuardedBy annotations on static fields or methods, +where the guard is either a non-static field or this. Guarding a static by a non-static may result in +excessive concurrency, multiple threads may be able to access the guarded field simultaneously, by locking in different object contexts. +Supported @GuardedBy annotations are: + \ No newline at end of file diff --git a/java/java-impl/src/inspectionDescriptions/UnknownGuard.html b/java/java-impl/src/inspectionDescriptions/UnknownGuard.html index c7bc98aa9844..6c566e4a576e 100644 --- a/java/java-impl/src/inspectionDescriptions/UnknownGuard.html +++ b/java/java-impl/src/inspectionDescriptions/UnknownGuard.html @@ -1,6 +1,14 @@ - Reports any @GuardedBy annotations (net.jcip.annotations|javax.annotation.concurrent|org.apache.http.annotation) where the guarding field - is unknown. +Reports @GuardedBy annotations where the specified guarding field is unknown. +Supported @GuardedBy annotations are: + \ No newline at end of file diff --git a/java/java-psi-api/src/com/intellij/codeInsight/ConcurrencyAnnotationsManager.java b/java/java-psi-api/src/com/intellij/codeInsight/ConcurrencyAnnotationsManager.java index 1a9ca536b4b8..2296c10c4312 100644 --- a/java/java-psi-api/src/com/intellij/codeInsight/ConcurrencyAnnotationsManager.java +++ b/java/java-psi-api/src/com/intellij/codeInsight/ConcurrencyAnnotationsManager.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.codeInsight; import com.intellij.openapi.components.ServiceManager; @@ -48,6 +34,8 @@ public class ConcurrencyAnnotationsManager { fillDefaults(myNotThreadSafeList, NOT_THREAD_SAFE); myImmutableList.add("com.google.auto.value.AutoValue"); + myImmutableList.add("com.google.errorprone.annotations.Immutable"); + myGuardedByList.add("com.google.errorprone.annotations.concurrent.GuardedBy"); } private static void fillDefaults(List list, final String annoName) {