com.jimischopp.checkstyle
Class ResourceUseFreedInFinallyCheck
java.lang.Object
com.puppycrawl.tools.checkstyle.api.AutomaticBean
com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
com.puppycrawl.tools.checkstyle.api.Check
com.jimischopp.checkstyle.AbstractBaseChecker
com.jimischopp.checkstyle.ResourceUseFreedInFinallyCheck
- All Implemented Interfaces:
- com.puppycrawl.tools.checkstyle.api.Configurable, com.puppycrawl.tools.checkstyle.api.Contextualizable
public class ResourceUseFreedInFinallyCheck
- extends AbstractBaseChecker
Ensures that the GcQsQuerySystem objects are being used correctly.
It checks for 4 things:
1) setConnection must be called before excute()
2) execute() must be called at least once
3) getResultSet() or getResults() must be called at least once
4) closeStatements() must be the last call on the object
Copyright 2003, James Schopp
- Since:
- Oct 27, 2003
- Author:
- James Schopp
- See Also:
Check
Methods inherited from class com.puppycrawl.tools.checkstyle.api.Check |
beginTree, destroy, finishTree, getClassLoader, getFileContents, getLines, getTokenNames, init, leaveToken, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens |
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter |
getId, getSeverity, getSeverityLevel, setId, setSeverity |
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean |
configure, contextualize |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
METH_SETCONNECTION
public final java.lang.String METH_SETCONNECTION
- See Also:
- Constant Field Values
METH_EXECUTE
public final java.lang.String METH_EXECUTE
- See Also:
- Constant Field Values
METH_GETRESULTSET1
public final java.lang.String METH_GETRESULTSET1
- See Also:
- Constant Field Values
METH_GETRESULTSET2
public final java.lang.String METH_GETRESULTSET2
- See Also:
- Constant Field Values
METH_CLOSESTATEMENTS
public final java.lang.String METH_CLOSESTATEMENTS
- See Also:
- Constant Field Values
ResourceUseFreedInFinallyCheck
public ResourceUseFreedInFinallyCheck()
getDefaultTokens
public int[] getDefaultTokens()
- Specified by:
getDefaultTokens
in class com.puppycrawl.tools.checkstyle.api.Check
getAcceptableTokens
public int[] getAcceptableTokens()
- Overrides:
getAcceptableTokens
in class com.puppycrawl.tools.checkstyle.api.Check
getRequiredTokens
public int[] getRequiredTokens()
- Overrides:
getRequiredTokens
in class com.puppycrawl.tools.checkstyle.api.Check
visitToken
public void visitToken(com.puppycrawl.tools.checkstyle.api.DetailAST ast)
- Overrides:
visitToken
in class com.puppycrawl.tools.checkstyle.api.Check