public class SuperFinalizeCheck extends AbstractSuperCheck
Checks that an overriding finalize() method invokes super.finalize(). Does not check native methods, as they have no possible java defined implementation.
Reference: Cleaning up unused objects.
An example of how to configure the check is:
<module name="SuperFinalize"/>
MSG_KEY| Constructor and Description |
|---|
SuperFinalizeCheck() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getMethodName()
Returns the name of the overriding method.
|
beginTree, getAcceptableTokens, getDefaultTokens, getRequiredTokens, leaveToken, visitTokendestroy, finishTree, getClassLoader, getFileContents, getLine, getLines, getTabWidth, getTokenNames, init, isCommentNodesRequired, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokensgetCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverityconfigure, contextualize, finishLocalSetup, getConfiguration, setupChildpublic SuperFinalizeCheck()
protected String getMethodName()
AbstractSuperCheckgetMethodName in class AbstractSuperCheckCopyright © 2001-2015. All Rights Reserved.