Class StreamResourceLeak
java.lang.Object
com.google.errorprone.bugpatterns.BugChecker
com.google.errorprone.bugpatterns.AbstractMustBeClosedChecker
com.google.errorprone.bugpatterns.StreamResourceLeak
- All Implemented Interfaces:
BugChecker.MethodTreeMatcher
,Suppressible
,Serializable
public class StreamResourceLeak
extends AbstractMustBeClosedChecker
implements BugChecker.MethodTreeMatcher
A
BugChecker
; see the associated BugPattern
annotation for details.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.errorprone.bugpatterns.AbstractMustBeClosedChecker
AbstractMustBeClosedChecker.Change
Nested classes/interfaces inherited from class com.google.errorprone.bugpatterns.BugChecker
BugChecker.AnnotatedTypeTreeMatcher, BugChecker.AnnotationTreeMatcher, BugChecker.ArrayAccessTreeMatcher, BugChecker.ArrayTypeTreeMatcher, BugChecker.AssertTreeMatcher, BugChecker.AssignmentTreeMatcher, BugChecker.BinaryTreeMatcher, BugChecker.BlockTreeMatcher, BugChecker.BreakTreeMatcher, BugChecker.CaseTreeMatcher, BugChecker.CatchTreeMatcher, BugChecker.ClassTreeMatcher, BugChecker.CompilationUnitTreeMatcher, BugChecker.CompoundAssignmentTreeMatcher, BugChecker.ConditionalExpressionTreeMatcher, BugChecker.ContinueTreeMatcher, BugChecker.DoWhileLoopTreeMatcher, BugChecker.EmptyStatementTreeMatcher, BugChecker.EnhancedForLoopTreeMatcher, BugChecker.ExpressionStatementTreeMatcher, BugChecker.ForLoopTreeMatcher, BugChecker.IdentifierTreeMatcher, BugChecker.IfTreeMatcher, BugChecker.ImportTreeMatcher, BugChecker.InstanceOfTreeMatcher, BugChecker.IntersectionTypeTreeMatcher, BugChecker.LabeledStatementTreeMatcher, BugChecker.LambdaExpressionTreeMatcher, BugChecker.LiteralTreeMatcher, BugChecker.MemberReferenceTreeMatcher, BugChecker.MemberSelectTreeMatcher, BugChecker.MethodInvocationTreeMatcher, BugChecker.MethodTreeMatcher, BugChecker.ModifiersTreeMatcher, BugChecker.NewArrayTreeMatcher, BugChecker.NewClassTreeMatcher, BugChecker.ParameterizedTypeTreeMatcher, BugChecker.ParenthesizedTreeMatcher, BugChecker.PrimitiveTypeTreeMatcher, BugChecker.ReturnTreeMatcher, BugChecker.SuppressibleTreePathScanner<R,
P>, BugChecker.SwitchTreeMatcher, BugChecker.SynchronizedTreeMatcher, BugChecker.ThrowTreeMatcher, BugChecker.TryTreeMatcher, BugChecker.TypeCastTreeMatcher, BugChecker.TypeParameterTreeMatcher, BugChecker.UnaryTreeMatcher, BugChecker.UnionTypeTreeMatcher, BugChecker.VariableTreeMatcher, BugChecker.WhileLoopTreeMatcher, BugChecker.WildcardTreeMatcher -
Field Summary
Fields inherited from class com.google.errorprone.bugpatterns.AbstractMustBeClosedChecker
HAS_MUST_BE_CLOSED_ANNOTATION
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Optional
<AbstractMustBeClosedChecker.Change> fix
(com.sun.source.tree.ExpressionTree tree, VisitorState state, com.google.errorprone.bugpatterns.AbstractMustBeClosedChecker.NameSuggester suggester) matchMethod
(com.sun.source.tree.MethodTree tree, VisitorState state) Methods inherited from class com.google.errorprone.bugpatterns.AbstractMustBeClosedChecker
exemptChange, scanEntireMethodFor
Methods inherited from class com.google.errorprone.bugpatterns.BugChecker
allNames, buildDescription, buildDescription, buildDescription, canonicalName, customSuppressionAnnotations, defaultSeverity, describeMatch, describeMatch, describeMatch, describeMatch, describeMatch, describeMatch, disableable, equals, hashCode, isSuppressed, isSuppressed, isSuppressed, isSuppressed, linkUrl, message, supportsSuppressWarnings, suppressedByAnyOf, suppressedRegions
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.errorprone.matchers.Suppressible
allNames, canonicalName, customSuppressionAnnotations, supportsSuppressWarnings, suppressedByAnyOf
-
Field Details
-
MATCHER
-
-
Constructor Details
-
StreamResourceLeak
public StreamResourceLeak()
-
-
Method Details
-
matchMethod
- Specified by:
matchMethod
in interfaceBugChecker.MethodTreeMatcher
-
fix
protected Optional<AbstractMustBeClosedChecker.Change> fix(com.sun.source.tree.ExpressionTree tree, VisitorState state, com.google.errorprone.bugpatterns.AbstractMustBeClosedChecker.NameSuggester suggester) - Overrides:
fix
in classAbstractMustBeClosedChecker
-