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.
References: How to Handle Java Finalization's Memory-Retention Issues; 10 points on finalize method in Java.
To configure the check:
<module name="SuperFinalize"/>
Parent is com.puppycrawl.tools.checkstyle.TreeWalker
Violation Message Keys:
missing.super.call
AutomaticBean.OutputStreamOptionsMSG_KEY| Constructor and Description |
|---|
SuperFinalizeCheck() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getMethodName()
Returns the name of the overriding method.
|
beginTree, getAcceptableTokens, getDefaultTokens, getRequiredTokens, leaveToken, visitTokenclearViolations, destroy, finishTree, getFileContents, getLine, getLineCodePoints, getLines, getTabWidth, getTokenNames, getViolations, init, isCommentNodesRequired, log, log, log, setFileContents, setTabWidth, setTokensfinishLocalSetup, getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, setId, setSeverityconfigure, contextualize, getConfiguration, setupChildpublic SuperFinalizeCheck()
protected java.lang.String getMethodName()
AbstractSuperCheckgetMethodName in class AbstractSuperCheckCopyright © 2001-2022. All Rights Reserved.