Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Check: CheckFinalizeImplementation #72

Closed
romani opened this issue Nov 3, 2012 · 0 comments
Closed

New Check: CheckFinalizeImplementation #72

romani opened this issue Nov 3, 2012 · 0 comments
Assignees

Comments

@romani
Copy link
Member

@romani romani commented Nov 3, 2012

  • Correct finalize() declaration. It is not a very simple and straight forward check, need investigation.

rules are here:
http://www.ibm.com/developerworks/ru/library/j-jtp06294/#2.3

we could check all except for calling finalize from user code (3rd in list of validations).

This Check detects 3 most common cases of incorrect finalize() method implementation:

//negates effect of superclass finalize
protected void finalize() { }
protected void finalize() { doSomething(); }
//useless (or worse) finalize
protected void finalize() { super.finalize(); }
//public finalize
public void finalize() { try { doSomething(); } finally { super.finalize() } }
@ghost ghost assigned maxvetrenko Jan 23, 2014
maxvetrenko added a commit to maxvetrenko/sevntu.checkstyle that referenced this issue Feb 11, 2014
maxvetrenko added a commit to maxvetrenko/sevntu.checkstyle that referenced this issue Feb 12, 2014
maxvetrenko added a commit to maxvetrenko/sevntu.checkstyle that referenced this issue Feb 15, 2014
maxvetrenko added a commit to maxvetrenko/sevntu.checkstyle that referenced this issue Feb 16, 2014
maxvetrenko added a commit to maxvetrenko/sevntu.checkstyle that referenced this issue Feb 16, 2014
maxvetrenko added a commit to maxvetrenko/sevntu.checkstyle that referenced this issue Feb 17, 2014
maxvetrenko added a commit to maxvetrenko/sevntu.checkstyle that referenced this issue Feb 19, 2014
maxvetrenko added a commit to maxvetrenko/sevntu.checkstyle that referenced this issue Feb 20, 2014
maxvetrenko added a commit to maxvetrenko/sevntu.checkstyle that referenced this issue Feb 25, 2014
maxvetrenko added a commit to maxvetrenko/sevntu.checkstyle that referenced this issue Feb 25, 2014
maxvetrenko added a commit to maxvetrenko/sevntu.checkstyle that referenced this issue Feb 25, 2014
maxvetrenko added a commit to maxvetrenko/sevntu.checkstyle that referenced this issue Feb 26, 2014
maxvetrenko added a commit to maxvetrenko/sevntu.checkstyle that referenced this issue Mar 5, 2014
maxvetrenko added a commit to maxvetrenko/sevntu.checkstyle that referenced this issue Mar 5, 2014
maxvetrenko added a commit to maxvetrenko/sevntu.checkstyle that referenced this issue Mar 6, 2014
maxvetrenko added a commit to maxvetrenko/sevntu.checkstyle that referenced this issue Mar 7, 2014
maxvetrenko added a commit to maxvetrenko/sevntu.checkstyle that referenced this issue Mar 7, 2014
maxvetrenko added a commit to maxvetrenko/sevntu.checkstyle that referenced this issue Mar 12, 2014
maxvetrenko added a commit to maxvetrenko/sevntu.checkstyle that referenced this issue Mar 12, 2014
maxvetrenko added a commit to maxvetrenko/sevntu.checkstyle that referenced this issue Mar 15, 2014
maxvetrenko added a commit to maxvetrenko/sevntu.checkstyle that referenced this issue Mar 15, 2014
maxvetrenko added a commit to maxvetrenko/sevntu.checkstyle that referenced this issue Mar 15, 2014
maxvetrenko added a commit to maxvetrenko/sevntu.checkstyle that referenced this issue Mar 15, 2014
@daniilyar daniilyar closed this in e881a2e Mar 17, 2014
daniilyar added a commit that referenced this issue Mar 17, 2014
…entation

Fixed #72. FinalizeImplementationCheck was introduced.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.