Uses of Interface
com.google.errorprone.matchers.Suppressible
Packages that use Suppressible
Package
Description
Checks added to the java compiler which detect common bug patterns.
Bug patterns related to dependency
injection and JSR 330.
Bug patterns related to Dagger.
Bug patterns related to Guice.
-
Uses of Suppressible in com.google.errorprone
Methods in com.google.errorprone with parameters of type SuppressibleModifier and TypeMethodDescriptionErrorProneTimings.span(Suppressible suppressible) Creates a timing span for the givenSuppressible.SuppressionInfo.suppressedState(Suppressible suppressible, boolean suppressedInGeneratedCode, VisitorState state) Returns true if this checker should be considered suppressed given the signals present in this object.VisitorState.timingSpan(Suppressible suppressible) Returns a timing span for the givenSuppressible. -
Uses of Suppressible in com.google.errorprone.bugpatterns
Subinterfaces of Suppressible in com.google.errorprone.bugpatternsModifier and TypeInterfaceDescriptionstatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfaceClasses in com.google.errorprone.bugpatterns that implement SuppressibleModifier and TypeClassDescriptionclassCheck for usage ofSet<T>orMap<T, E>.classAn abstract class that detects use of the unsafe APIs.classAbstractMockChecker<T extends Annotation>Helper for enforcing Annotations that disallow mocking.classAn abstract check for resources that must be closed; used byStreamResourceLeakandMustBeClosedChecker.classFinds calls to regex-accepting methods with literal strings.classAbstract implementation of a BugPattern that detects the use of reference equality to compare classes with value semantics.classAn abstract base class to match API usages in which the return value is not used.classAn abstract matcher for implicit and explicit calls toObject.toString(), for use on types that do not have a human-readabletoString()implementation.classHelper for refactoring from if-else chains to switches.final classABugChecker; see the associatedBugPatternannotation for details.final classBugpattern to find conditions which are checked more than once.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.final classChecks annotation positioning, and orphaned Javadocs.classABugChecker; see the associatedBugPatternannotation for details.classWarns that users should not have an array as a key to a Set or MapclassclassChecks when Arrays.fill(Object[], Object) is called with object types that are guaranteed to result in an ArrayStoreException.classfinal classABugChecker; see the associatedBugPatternannotation for details.classclassclassclassABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.final classA BugPattern; see the summary.classA BugPattern; see the summaryfinal classChecks thatAsyncCallableimplementations do not directlyreturn null.final classChecks thatAsyncFunctionimplementations do not directlyreturn null.classA BugPattern; see the summary.classSee summary for details.final classSee summary for details.classChecks the toString(), hashCode() and equals() methods are final in AutoValue classes.classFlags mutable collections in AutoValue.final classMatchesAutoValue_uses outside the containing file.classABugChecker; see the associatedBugPatternannotation for details.classChecker that ensures implementations ofAnnotationoverride equals and hashCode.classclassfinal classMatches instanceof checks where the expression is a subtype of the checked type.classfinal classABugCheckerthat detects use of the unsafe JNDI API system.final classABugCheckerthat detects use of the unsafe JNDI API system.final classABugCheckerthat detects use of the unsafeSerializableAPI.classA BugChecker; see the associated BugPattern for details.final classMatches use ofBigDecimal#equals, which compares scale as well (which is not likely to be intended).classMatches usages ofnew BigDecimal(double)which lose precision.classSimplifies Boolean.TRUE/FALSE to true/false.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.final classABugChecker; see the associatedBugPatternannotation for details.classA base class for implementing bug checkers.final classSee thesummary.classChecks when ByteBuffer.array() is used without calling .arrayOffset() to know the offset of the array, or when the buffer wasn't initialized using ByteBuffer.wrap() or ByteBuffer.allocate().classABugChecker; see the associatedBugPatternannotation for details.classBug pattern to recognize attempts to mock final types.final classA BugPattern; see the summaryclassABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.final classFlags code which catchesRuntimeExceptions under the guise of catchingException.final classIdentifies calls toassertThatand similar methods inside the implementation of aSubjectassertion method.final classChecks, if two constructors in a class both acceptFoo fooand one calls the other, that the caller passesfooas a parameter.classChecks for use of Character.getNumericValue and UCharacter.getNumericValuefinal classFlags checked exceptions which are claimed to be thrown, but are not.final classChecks for the same variable being checked against null twice in a method.classclassclassSee the summary.classABugChecker; see the associatedBugPatternannotation for details.classclassABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classclassclassclassfinal classSuggests comparing the result ofcompareToto only0.classCheck for expressions containingthis != nullorthis == nullclassclassABugChecker; see the associatedBugPatternannotation for details.classA Bugpattern; see the accompanying Markdown documentation.classfinal classFlags ambiguous creations of objects inMap.computeIfAbsent(K, Function).classclassABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.final classFlags variables initialized withPattern.compile(String)calls that could be constants.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classclassABugChecker; see the associatedBugPatternannotation for details.classA checker that suggests deduplicating literals with existing constant variables.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.final classJava classes shouldn't use default package.classMatches the behaviour of the javac dep-ann Xlint warning.classABugChecker; see the associatedBugPatternannotation for details.final classDiscourages using multiple names to refer to the same type within a file (e.g. bothOuterClass.InnerClassandInnerClass).final classA bugpattern; see the description.classABugChecker; see the associatedBugPatternannotation for details.final classErrorProne checker to generate warning when method expecting distinct varargs is invoked with same variable argument.classABugChecker; see the associatedBugPatternannotation for details.classIf a method always throws an exception, consider annotating it with@DoNotCallto prevent calls at compile-time instead failing at runtime.classABugChecker; see the associatedBugPatternannotation for details.final classSuggests not mocking AutoValue classes.classPoints out if a Mockito or EasyMock mock is mocking an object that would be better off being tested using an alternative instance.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.final classFlag DateFormats which use the same field more than once.classFlags duplicate keys used in ImmutableMap construction.final classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classThis checker finds and fixes empty statements after an if, with no else part.final classABugChecker; see the associatedBugPatternannotation for details.final classDiscourages the use ofEnum.ordinal()and other ways to access enum values by index.final classDiscourages the use ofObject.getClass()when implementingObject.equals(Object)for non-final classes.classClasses that overrideObject.equals(Object)should also overrideObject.hashCode().classclassfinal classABugChecker; see the associatedBugPatternannotation for details.classfinal classChecks forequalsimplementations making unsafe casts.final classDiscourages implementingequalsusinghashCode.final classChecks forequalsimplementations comparing non-corresponding fields.final classA BugPattern; see the summary.final classErrorProne checker to generate warning wheneverThreadPoolExecutoris constructed with differentcorePoolSizeandmaximumPoolSizeusing an unboundedworkQueueclassABugChecker; see the associatedBugPatternannotation for details.classError checker for calls to the Preconditions class in Guava which use 'expensive' methods of producing the error string.final classABugChecker; see the summary.classfinal classMakes sure that you are not extending a class that has @AutoValue as an annotation.classABugChecker; see the associatedBugPatternannotation for details.classfinal classFlags fields which can be replaced with local variables.final classFinds fields which can be safely made static.classABugChecker; see the associatedBugPatternannotation for details.classMatches the behaviour of javac's finally Xlint warning.classABugChecker; see the associatedBugPatternannotation for details.final classDetects usages ofFloat,DoubleSubject.isWithin(TOLERANCE).of(EXPECTED)where there are no other floating point values other thanEXPECTEDwith satisfy the assertion, butTOLERANCEis not zero.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classVerifies that methods markedForOverrideare only called from the defining class.classABugChecker; see the associatedBugPatternannotation for details.classfinal classSee BugPattern annotation.final classChecks for calls to Guava'sFutures.getCheckedmethod that will always fail because they pass an incompatible exception type.final classSee summary for details.classclassABugChecker; see the associatedBugPatternannotation for details.classclassABugChecker; see the associatedBugPatternannotation for details.final classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classclassABugChecker; see the associatedBugPatternannotation for details.final classFlags a few ways in which member names may violate the style guide.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.final classFlags ignored return values from pure getters.final classRefactoring to suggest Immutable types for member collection that are not mutated.final classRefactoring to suggest usingprivate static finalImmutableSetoverImmutableListwhen using only contains, containsAll and isEmpty.final classMigrates Truth subjects from a manual "test and fail" approach to one usingSubject.check(...).final classMatches comparison of proto fields tonull.classABugChecker; see the associatedBugPatternannotation for details.classclassChecker for variables under the same scope that only differ in capitalization.final classLooks for hashCode implementations which are inconsistent with equals.final classSee BugPattern annotation.classclassABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.final classBugpattern to encourage initializing effectively final variables inline with their declaration, if possible.final classA BugPattern; see the summary.classABugChecker; see the associatedBugPatternannotation for details.classChecks that InputStreams should override int read(byte[], int, int);classclassfinal classBugpattern to detect interfaces used only to store static fields/methods.final classChecks for cases where anInterruptedExceptionis caught as part of a catch block catching a supertype, and not specially handled.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classclassclassValidates ZoneId.final classclassABugChecker; see the associatedBugPatternannotation for details.classclassABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classDetects floating-point assertEquals() calls that will not work in JUnit 4.final classA bugpattern; see the associated summary.class@BeforeClassor@AfterClassshould be applied to static methods.classfinal classDeletes empty JUnit4@Before,@After,@BeforeClass, and@AfterClassmethods.classChecks for the existence of a JUnit3 style setUp() method in a JUnit4 test class or methods annotated with a non-JUnit4 @Before annotation.classChecks for the existence of a JUnit3 style tearDown() method in a JUnit4 test class or methods annotated with a non-JUnit4 @After annotation.classfinal classFinds tests that won't run due to the enclosing runner.classclassPoints out if an object is tested for reference equality to itself using JUnit library.classChecks if the methods specified injunitparams.Parametersannotation to provide parameters exists.classA BugPattern; see the summary.classclassclassPoints out if #valueOf() is called on a Protocol Buffer Enum.final classFlags calls totoStringon lite protos.final classSuggests that calls toLock.lockmust be immediately followed by atry-finallythat callsLock.unlock.classDetects locks on boxed primitives.classBug checker to detect the usage of lock on the class other than the enclosing class of the code block.classABugChecker; see the associatedBugPatternannotation for details.final classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classMatcher for alongliteral with a lower-case ell for a suffix (e.g.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classChecker to prevent usages of comparison methods where both the operands undergo lossy widening.final classfinal classCheck for calls to Math'sMath.round(float)with an integer or long parameter.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.final classSee the summary.final classA BugPattern; see the summary.final classSee the summary.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classclassABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.final classABugChecker; see the associatedBugPatternannotation for details.classfinal classMatches test helpers which require a terminating method to be called.classBase class for checks which find common errors in date format patterns.final classBan use of D (day-of-year) in a date format pattern that also contains M (month-of-year).final classBan use of YYYY in a SimpleDateFormat pattern, unless it is being used for a week date.classABugChecker; see the associatedBugPatternannotation for details.final classChecks for calls toDescriptor#findFieldByNumberwith field numbers from a different proto.final classFlags methods which return mutable collections from some code paths, but immutable ones from others.final classA BugPattern; see the summaryfinal classA BugPattern; see the summary.classABugChecker; see the associatedBugPatternannotation for details.final classA BugPattern; see the summary.classMatches creation of new collections/proto builders which are modified but never used.classclassclassIdentify the backing collection source of a stream and reports if the source is mutated during the stream operations.final classA BugPattern; see the summary.classfinal classABugChecker; see the associatedBugPatternannotation for details.classclassABugChecker; see the associatedBugPatternannotation for details.classChecks if a constructor or method annotated withMustBeClosedis called within the resource variable initializer of a try-with-resources statement.classABugChecker; see the associatedBugPatternannotation for details.classCheck for public static final declaration of Arrays.final classWarns on classes or methods being named similarly to contextual keywords, or invoking such methods.final classA BugPattern; see the summary.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.final classDiscourages the use of negative boolean names.classABugChecker; see the associatedBugPatternannotation for details.classclassABugChecker; see the associatedBugPatternannotation for details.classChecks methods annotated with@NoAllocationto ensure they really do not allocate.final classFlags instances of non-API types from being accepted or returned in APIs.classDetects non-atomic updates to volatile variables.classTypes shouldn't be statically by their non-canonical name.classMembers shouldn't be statically imported by their non-canonical name.final classFlags types being referred to by their non-canonical name.classEnforce that @CompileTimeConstant parameters are final or effectively final.final classA BugPattern; see the summary.classBug checker for equals methods that don't actually override equals.classclassABugChecker; see the associatedBugPatternannotation for details.final classA bugpattern; see the summary.final classclassABugChecker; see the associatedBugPatternannotation for details.final classABugChecker; see the associatedBugPatternannotation for details.final classFlags passing literal null toOptional-accepting APIs.classABugChecker; see the associatedBugPatternannotation for details.classCheck for usage ofObjects.equalon primitive types.final classCheck for calls to Objects'Objects.hashCode(Object)with a primitive parameter.classWarns against calling toString() on Objects which don't have toString() method overridden and won't produce meaningful output.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.final classMatchesOptional#mapmapping to anotherOptional.final classReplacesOptional.mapwithOptional.ifPresentif the value is unused.final classclassChecks ifOptional#ofis chained with a redundant method.classABugChecker; see the associatedBugPatternannotation for details.classCheck for the a11y antipattern of setting CSS outline attributes to none or 0.classMatches the behaviour of javac's overrides Xlint warning.final classWarns against overriding toString() in a Throwable class and suggests getMessage()classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.final classFlags uses of parameters in non-parameterized tests.final classA BugPattern; see the summary.classChecks that Precondition.checkNotNull is not invoked with same arg twice.classfinal classA BugPattern; see the summary.final classTightens types which refer to an Iterable, Map, Multimap, etc.classfinal classDiscourages inadvertently using reference equality on boxed primitives in AtomicReference.final classclassCheck for disallowed access to private_do_not_access_or_else proto fields.classFlags protected members in final classes.final classHighlights cases where a proto's build method has its return value ignored.classPoints out if #ordinal() is called on a Protocol Buffer Enum.classfinal classChecks thatProtoTruth'signoringFieldsis passed field numbers from the correct proto.classChecks if public APIs named "stream" returns a type whose name ends with Stream.classABugChecker; see the associatedBugPatternannotation for details.classclassABugChecker; see the associatedBugPatternannotation for details.final classA bug checker; see the summary.final classRemoves overrides which purely pass through to the method in the super class.final classA BugPattern; see the summary.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.final classclassclassCheck for non-allowlisted callers to RestrictedApiChecker.classABugChecker; see the associatedBugPatternannotation for details.final classABugChecker; see the associatedBugPatternannotation for details.classFlags methods with collection return types which returnnullin some cases but don't annotate the method as @Nullable.classA checker which produces an error when a return value is accidentally discarded.classABugChecker; see the summary.final classA BugPattern; see the summary.final classABugChecker; see the associatedBugPatternfor details.final classLooks for types being shadowed by other types in a way that may be confusing.final classABugChecker; see the associatedBugPatternannotation for details.final classABugPattern; see the summary.classTODO(eaftan): Consider cases where the parent is not a statement or there is no parent?classPoints out if an object is compared to itself.classfinal classA BugPattern; see the summary.final classA BugPattern; see the summary.classclassChecks that variable argument methods have even number of arguments.classFinds instances where one usesCollection#size() >= 0orT[].length > 0.final classChecks for statement switches that can be converted into a new-style arrow (`->`) switch.final classChecks for static fields being assigned within constructors.final classChecks for static fields being assigned withThrowable.final classABugChecker; see the associatedBugPatternannotation for details.classclassABugChecker; see the associatedBugPatternannotation for details.final classDiscouragestream::iteratorto createIterables.classABugChecker; see the associatedBugPatternannotation for details.classfinal classABugCheckerthat flags calls toString.toLowerCase()andString.toUpperCase(), as these methods implicitly rely on the environment's default locale.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.final classABugChecker; see the associatedBugPatternannotation for details.final classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.final classFlags fields which would be better expressed as ByteStrings rather than primitive byte arrays.final classCheck for calls to String'sfoo.substring(0).classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classFind uses of SuppressWarnings with "deprecated".final classFinds occurrences of@SuppressWarningswhere there is definitely no explanation for why it is safe.classclassABugChecker; see the associatedBugPatternannotation for details.classFlagsjavax.lang.model.element.Element#toStringusage inBugCheckers.classABugChecker; see the associatedBugPatternannotation for details.classCheck for calls toSystem.exit()outside of a main method.final classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.final classFlags uses of parameters in non-parameterized tests.final classFlags uses of@Theory(and others) in non-Theories-run tests.final classA check that bans using placeholders inThread.Builder.name(String)andThread.Builder.name(String, int).classclassABugChecker; see the associatedBugPatternannotation for details.classclassA BugPattern; see the summary.classA BugPattern; see the summary.classABugChecker; see the associatedBugPatternannotation for details.final classBugpattern to discourage throwing base exception classes.classSuggests to remove the unchecked throws clause.classABugChecker; see the associatedBugPatternannotation for details.classToString should not return null.classABugChecker; see the associatedBugPatternannotation for details.classWarns against use of bothstaticandtransientmodifiers on field declarations.classFlagscom.sun.source.tree.Tree#toStringusage inBugCheckers.final classDetects usages of Truth assertions with the expected and actual values reversed.classPoints out if Truth Library assert is called on a constant.final classABugChecker; see the associatedBugPatternannotation for details.final classFlags ambiguous usages ofMap#getOrDefaultwithinTruth#assertThat.classABugChecker; see the associatedBugPatternannotation for details.classA bug checker for the following code pattern:classABugChecker; see the associatedBugPatternannotation for details.classFlags com.sun.tools.javac.code.Type#equals usage.classWarns when a type parameter shadows another type name in scope.classEnforces type parameters match the google style guide.classABugChecker; see the associatedBugPatternannotation for details.classclassclassFlagsjavax.lang.model.type.TypeMirror#toStringusage inBugCheckers.final classFlags types which do not have well-defined equals behavior.classfinal classBans, without the possibility of suppression, the use of direction-changing Unicode escapes.final classReplaces printable ASCII unicode escapes with the literal version.final classBans using non-ASCII Unicode characters outside string literals and comments.final classFlags uses of fully qualified names which are not ambiguous if imported.final classSuggests restricting the visibility of methods which should only be called by a framework.classABugChecker; see the associatedBugPatternannotation for details.final classDiscourage manual initialization or assignment to fields annotated with framework annotations.final classA BugPattern; see the summary.classFinds and fixes unnecessarily boxed return expressions.classFinds and fixes unnecessarily boxed variables.classABugChecker; see the associatedBugPatternannotation for details.final classA BugPattern; see the summary.classABugChecker; see the associatedBugPatternannotation for details.final classRemovesfinalfrom non-field variables.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classMatchers.methodInvocation(Matcher)is not exactly deprecated, but it is legacy, and in particular is not needed when the argument is a MethodMatcher, since MethodMatcher already does the unwrapping that methodInvocation does.final classMatches unnecessary uses of method references.final classA refactoring to replace Optional.get() with lambda arg in expressions passed as arg to member functions of Optionals.classABugChecker; see the associatedBugPatternannotation for details.final classA BugPattern; see the summary.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.final classSee the summary.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.final classFlags unsafe usages of theLocaleconstructor and class methods.classChecks unsafe instance creation via reflection.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classfinal classBugpattern for catch blocks which catch an exception but throw another one without wrapping the original.final classA BugPattern; see the summary.final classBugpattern to detect unused declarations.final classBugpattern to detect unused nested classes.final classA BugPattern; see the summary.final classBugpattern to detect unused declarations.classPoints out on creation of Set and HashMap of type java.net.URL.classclassABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classCheck for variables and types with the same namefinal classConverts some local variables to usevar.classABugChecker; see the associatedBugPatternannotation for details.final classA BugPattern; see the summary.classclassABugChecker; see the associatedBugPatternannotation for details.classMethodMatchers.MethodClassMatcher.withSignature(String)is discouraged: most usages should use .named and/or .withParameters instead.final classMatches always-default expressions in oneof switches.classABugChecker; see the associatedBugPatternannotation for details.final classSee the summary. -
Uses of Suppressible in com.google.errorprone.bugpatterns.android
Classes in com.google.errorprone.bugpatterns.android that implement SuppressibleModifier and TypeClassDescriptionclassclassclassclassclassclassclassReplacement of misleading android.R.string constants with more intuitive ones.classBugPattern to detect classes which implement android.os.Parcelable but don't have public static CREATOR.final classclassclass -
Uses of Suppressible in com.google.errorprone.bugpatterns.apidiff
Classes in com.google.errorprone.bugpatterns.apidiff that implement SuppressibleModifier and TypeClassDescriptionclassA base Error Prone check implementation to enforce compliance with a given API diff.classChecks for uses of classes, fields, or methods that are not compatible with JDK 8 -
Uses of Suppressible in com.google.errorprone.bugpatterns.argumentselectiondefects
Classes in com.google.errorprone.bugpatterns.argumentselectiondefects that implement SuppressibleModifier and TypeClassDescriptionclassChecks the lexical distance between method parameter names and the argument names at call sites.final classChecker to make sure that assertEquals-like methods are called with the arguments expected and actual the right way round.final classChecker to make sure that constructors for AutoValue types are invoked with arguments in the correct order. -
Uses of Suppressible in com.google.errorprone.bugpatterns.checkreturnvalue
Classes in com.google.errorprone.bugpatterns.checkreturnvalue that implement SuppressibleModifier and TypeClassDescriptionclassDiscourages builder instance methods that do not return 'this'.final classChecker that recommends annotating a method with@CanIgnoreReturnValueif the method returnsthis, returns an effectively final input param, or if it looks like a builder method (that is likely to returnthis).final classChecker that "pushes" the@CanIgnoreReturnValueannotation down from classes to methods.final classChecker that warns when capturing the result of an ignorable API into anunusedvariable.final classChecker that recommends using ErrorProne's version of@CheckReturnValueover the version in JSR305 (which is defunct). -
Uses of Suppressible in com.google.errorprone.bugpatterns.collectionincompatibletype
Classes in com.google.errorprone.bugpatterns.collectionincompatibletype that implement SuppressibleModifier and TypeClassDescriptionclassChecker for calling Object-accepting methods with types that don't match the type arguments of their container types.final classHighlights use ofCollection#contains(and others) with types that do not have well-defined equals.classclassfinal classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details. -
Uses of Suppressible in com.google.errorprone.bugpatterns.flogger
Classes in com.google.errorprone.bugpatterns.flogger that implement SuppressibleModifier and TypeClassDescriptionclassABugChecker; see the associatedBugPatternannotation for details.classclassDetects invocations ofLoggingApi.log(String)for which the argument is not a compile-time constant and provides suggested alternatives.final classfinal classFlags cases where there is an exception available that could be set as the cause in a log message.classclassChecks for usages ofperwithout a corresponding call toatMostEvery,every, oronAverageEveryin the same logging chain.classfinal classEnsures that class-level FluentLogger objects are private static final.final classBugpattern to prevent splitting flogger log invocations into multiple statements.classABugChecker; see the associatedBugPatternannotation for details.classFlogger's withCause(Throwable) method checksclassDetects Flogger log statements that pass Exceptions to the log method instead of using withCause. -
Uses of Suppressible in com.google.errorprone.bugpatterns.formatstring
Classes in com.google.errorprone.bugpatterns.formatstring that implement SuppressibleModifier and TypeClassDescriptionfinal classA BugPattern; see the summary.classABugChecker; see the associatedBugPatternannotation for details.final classBugCheckerto assert validity of methods calls withFormatStringannotations.classABugChecker; see the associatedBugPatternannotation for details.final classA BugPattern; see the summary. -
Uses of Suppressible in com.google.errorprone.bugpatterns.inject
Classes in com.google.errorprone.bugpatterns.inject that implement SuppressibleModifier and TypeClassDescriptionclassclassclassclassclassA checker for injected constructors with @Inject(optional=true) or binding annotations.classclassChecks if class constructor and members are both annotated as @Inject.classclassclassclassBug checker for when a scope annotation is used at injection site, which does not have any effect on the injected values.classclassMatches classes that have two or more constructors annotated with @Inject.classclassThis checker matches if a class has more than one annotation that is a scope annotation(that is, the annotation is either annotated with Guice's@ScopeAnnotationor Javax's@Scope).classclassclassclass -
Uses of Suppressible in com.google.errorprone.bugpatterns.inject.dagger
Classes in com.google.errorprone.bugpatterns.inject.dagger that implement SuppressibleModifier and TypeClassDescriptionfinal classfinal classclassclassBug checker for null-returning methods annotated with@Providesbut not@Nullable.final classChecks that the only code that refers to Dagger generated code is other Dagger generated code.final classMigrate users who use JSR 330 scopes on Dagger modules.class -
Uses of Suppressible in com.google.errorprone.bugpatterns.inject.guice
Classes in com.google.errorprone.bugpatterns.inject.guice that implement SuppressibleModifier and TypeClassDescriptionclassThis checker matches iff *both* of the following conditions are true: 1) The class is assisted: a) If there is a constructor that is annotated with @Inject and that constructor has at least one parameter that is annotated with @Assisted. b) If there is no @Inject constructor and at least one constructor is annotated with@AssistedInject. 2) There is an annotation on the class, and the annotation is itself annotated with@ScopeAnnotation.classclassclassclassThis checker matches methods that 1) are not themselves annotated with @Inject (neither javax.inject.Inject nor com.google.inject.Inject) 2) descend from a method that is annotated with @com.google.inject.InjectclassThis checker matches methods that 1) are not themselves annotated with @Inject 2) descend from a method that is annotated with @javax.inject.Inject 3) do not descent from a method that is annotated with @com.google.inject.Injectclass -
Uses of Suppressible in com.google.errorprone.bugpatterns.inlineme
Classes in com.google.errorprone.bugpatterns.inlineme that implement SuppressibleModifier and TypeClassDescriptionfinal classChecker that performs the inlining at call-sites (where the invoked APIs are annotated as@InlineMe).final classChecker that recommends using@InlineMeon single-statement deprecated APIs.final classChecker that ensures the@InlineMeannotation is used correctly. -
Uses of Suppressible in com.google.errorprone.bugpatterns.javadoc
Classes in com.google.errorprone.bugpatterns.javadoc that implement SuppressibleModifier and TypeClassDescriptionfinal classFlags comments which appear to be intended to be Javadoc, but are not started with an extra*.final classMatches block tags (@param, @return, @throws, @deprecated) with an empty description.final classFinds unescaped entities in Javadocs.final classMatches invalid usage of @inheritDoc.final classMatches invalid Javadoc tags, and tries to suggest fixes.final classMatches invalid Javadoc tags, and tries to suggest fixes.final classFinds some common errors in @link tags.final classMatches incorrect Javadoc @param tags.final classA bug pattern; see the summary.final classMatches errors in Javadoc @throws tags.final classMatches misuse of link tags within throws tags.final classFinds malformed inline tags where @{tag is used instead of {@tag.final classMatches Javadocs which are missing a required summary line.final classA BugPattern; see the summary.final classFinds common Javadoc errors, and tries to suggest useful fixes.final classFinds unescaped entities in Javadocs.final classFlags tags which haven't been recognised by the Javadoc parser.final classDiscourages using URLs in @see tags. -
Uses of Suppressible in com.google.errorprone.bugpatterns.nullness
Classes in com.google.errorprone.bugpatterns.nullness that implement SuppressibleModifier and TypeClassDescriptionfinal classRefactoring to add@NullMarkedannotation to package-info.java files.final classABugChecker; see the associatedBugPatternannotation for details.classBugCheckeradds a null check toequals()method implementations which don't satisfy the null contract ofObject.equals(Object)i.e.classABugChecker; see the associatedBugPatternannotation for details.final classA bugpattern: see the summary.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classclassABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.final classABugChecker; see the associatedBugPatternannotation for details.final classABugChecker; see the associatedBugPatternannotation for details.classA bug checker; see the summary.classABugChecker; see the associatedBugPatternannotation for details.classChecks for unnecessarily performing null checks on expressions which can't be null.classCheck to detect unsafe upcasts ofnullvalues to wildcard types.classABugChecker; see the associatedBugPatternannotation for details. -
Uses of Suppressible in com.google.errorprone.bugpatterns.overloading
Classes in com.google.errorprone.bugpatterns.overloading that implement SuppressibleModifier and TypeClassDescriptionfinal classABugCheckerthat detects inconsistently overloaded methods in Java classes. -
Uses of Suppressible in com.google.errorprone.bugpatterns.threadsafety
Classes in com.google.errorprone.bugpatterns.threadsafety that implement SuppressibleModifier and TypeClassDescriptionclassABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classABugChecker; see the associatedBugPatternannotation for details.classBug checker to detect usage ofThread.stop(),Thread.yield(), and changing thread priorities.classABugChecker; see the associatedBugPatternannotation for details. -
Uses of Suppressible in com.google.errorprone.bugpatterns.time
Classes in com.google.errorprone.bugpatterns.time that implement SuppressibleModifier and TypeClassDescriptionfinal classWarns against suspect looking calls toDateAPIs.final classfinal classBans calls toDuration.get(temporalUnit)wheretemporalUnitis notSECONDSorNANOS.final classBans calls toDurationAPIs where theTemporalUnitis notChronoUnit.DAYSor it has an estimated duration (which is guaranteed to throw anDateTimeException).final classReports an error when a Duration or Instant is incorrectly decomposed in order to call an API which accepts a<long, TimeUnit>pair.final classBans calls tojavaTimeType.from(temporalAmount)where the call is guaranteed to either: throw aDateTimeExceptionat runtime (e.g.,LocalDate.from(month)) return the same parameter (e.g.,Instant.from(instant))final classBans calls toInstantAPIs where theTemporalUnitis not one of:NANOS,MICROS,MILLIS,SECONDS,MINUTES,HOURS,HALF_DAYS, orDAYS.final classThis checker errors on calls tojava.timemethods using values that are guaranteed to throw aDateTimeException.final classThis checker warns about calls toduration.getNano()without a corresponding "nearby" call toduration.getSeconds().final classError prone checking forDuration.getSeconds()withoutDuration.getNano().final classCheck for calls toduration.withNanos(int).final classCheck for calls toduration.withSeconds(long).final classThis checker warns about calls toinstant.getNano()without a corresponding "nearby" call toinstant.getEpochSecond().final classThis checker warns about calls toLocalDateTime.getNano()without a corresponding "nearby" call toLocalDateTime.getSecond().final classThis checker warns about calls toLocalTime.getNano()without a corresponding "nearby" call toLocalTime.getSecond().final classThis checker warns about calls toperiod.getDays()without a corresponding "nearby" call toperiod.getYears(), period.getMonths(), or period.getTotalMonths().final classCheck for calls tojava.timeAPIs that silently use the default system time-zone.final classCheck for calls to bad JodaTime constructors.final classChecks for usages of dangerousDateTimeConstantsconstants.final classCheck for calls toduration.withMillis(long).final classCheck for calls toinstant.withMillis(long).final classMatch possibly incorrect use of Period to obtain a number of (e.g.) days between two dates.final classCheck for calls to JodaTime'stype.plus(long)andtype.minus(long)where<type> = {Duration,Instant,DateTime,DateMidnight}.final classBan usage of Joda'sConverterManager.final classCheck for calls to Joda-Time'sfoo.toFoo()andnew Foo(foo).final classCheck for calls to JodaTime'stype.withDurationAdded(long, int)where<type> = {Duration,Instant,DateTime}.final classBans calls toLocalDate.plus(TemporalAmount)andLocalDate.minus(TemporalAmount)where theTemporalAmountis a non-zeroDuration.final classfinal classBans calls toPeriod.get(temporalUnit)wheretemporalUnitis notYEARS,MONTHS, orDAYS.final classBans calls toPeriod#plus/minus(TemporalAmount)where the argument is a Duration.final classThis check suggests the use ofjava.time-based APIs, when available.final classThis checker warns about accessing the underlying nanosecond-adjustment field of a duration without a "nearby" access of the underlying seconds field.final classThis checker warns about accessing the underlying nanosecond-adjustment field of a protobuf timestamp without a "nearby" access of the underlying seconds field.final classFlags fields which would be better expressed as time types rather than primitive integers.final classBans calls toTemporalAccessor.get(ChronoField)where the implementation is guaranteed to throw anUnsupportedTemporalTypeException.final classA BugPattern; see the summary.final classCheck for problematic or suspicious TimeUnit conversion calls.final classChecker that detects likely time-unit mismatches by looking at identifier names.final classThis checker bans calls toZoneId.of("Z")in favor ofZoneOffset.UTC. -
Uses of Suppressible in com.google.errorprone.scanner
Methods in com.google.errorprone.scanner with parameters of type SuppressibleModifier and TypeMethodDescriptionprotected voidErrorProneScanner.handleError(Suppressible s, Throwable t) Handles an exception thrown by an individual BugPattern.protected voidScanner.handleError(Suppressible s, Throwable t) Handles an exception thrown by an individual check.protected SuppressionInfo.SuppressedStateScanner.isSuppressed(Suppressible suppressible, ErrorProneOptions errorProneOptions, VisitorState state) Returns if this checker should be suppressed on the current tree path.