-
Deprecated InterfacesInterfaceDescriptionuse
Matcher<ExpressionTree>
instead of referring directly to this type.useMatcher<ExpressionTree>
instead of referring directly to this type.useMatcher<ExpressionTree>
instead of referring directly to this type.useMatcher<ExpressionTree>
instead of referring directly to this type.useMatcher<ExpressionTree>
instead of referring directly to this type.useMatcher<ExpressionTree>
instead of referring directly to this type.useMatcher<ExpressionTree>
instead of referring directly to this type.useMatcher<ExpressionTree>
instead of referring directly to this type.useMatcher<ExpressionTree>
instead of referring directly to this type.
-
Deprecated Annotation TypesAnnotation TypeDescriptionthe correctness of this annotation is not enforced; it will soon be removed.the correctness of this annotation is not enforced; it will soon be removed.
-
Deprecated MethodsMethodDescriptionuse
IncompatibleModifiers.modifier()
insteaduseRequiredModifiers.modifier()
insteadthis is a no-op that will be removed in the futureuseBugChecker.isSuppressed(Tree, VisitorState)
insteaduseBugChecker.isSuppressed(Symbol, VisitorState)
insteadWellKnownMutability.getKnownImmutableClasses()
is clearer if you're dealing with this specific class.WellKnownMutability.getKnownMutableClasses()
is clearer if you're dealing with this specific class.prefer referring to empty fixes usingSuggestedFix.emptyFix()
.useMatchers.isNonNullUsingDataflow()
instead.useMatchers.isNullUsingDataflow()
instead.IfannotationClass
contains a member that is aClass
or an array of them, attempting to access that member from the Error Prone checker code will result in a runtime exception. Instead, operate onsym.getAnnotationMirrors()
to meta-syntactically inspect the annotation.IfannotationClass
contains a member that is aClass
or an array of them, attempting to access that member from the Error Prone checker code will result in a runtime exception. Instead, operate onsym.getAnnotationMirrors()
to meta-syntactically inspect the annotation.com.google.errorprone.util.ASTHelpers.hasAnnotation(Tree, Class<? extends Annotation>, VisitorState) preferASTHelpers.hasAnnotation(Symbol, String, VisitorState)
to avoid needing a runtime dependency on the annotation class, and to prevent issues if there is skew between the definition of the annotation on the runtime and compile-time classpathspreferASTHelpers.hasAnnotation(Symbol, String, VisitorState)
to avoid needing a runtime dependency on the annotation class, and to prevent issues if there is skew between the definition of the annotation on the runtime and compile-time classpaths
-
Deprecated ConstructorsConstructorDescriptionIf VisitorState is needed, use
VisitorState.createForUtilityPurposes(com.sun.tools.javac.util.Context)
, otherwise just use utility methods in ASTHelpers that don't need VisitorSate.Use the equivalent factory methodVisitorState.createForCustomFindingCollection(com.sun.tools.javac.util.Context, com.google.errorprone.DescriptionListener)
.
-
Deprecated Annotation Type ElementsAnnotation Type ElementDescriptionuse
IncompatibleModifiers.modifier()
insteaduseRequiredModifiers.modifier()
insteadthis is a no-op that will be removed in the future
Matcher<ExpressionTree>
instead of referring directly to this type.