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

Invoking a static method from an instance #33

Closed
cushon opened this issue Oct 31, 2014 · 7 comments
Closed

Invoking a static method from an instance #33

cushon opened this issue Oct 31, 2014 · 7 comments

Comments

@cushon
Copy link
Collaborator

cushon commented Oct 31, 2014

Original issue created by kevinb@google.com on 2012-08-03 at 03:52 PM


someFoo.someStaticMethod() is a piece of awfulness that leads nowhere good. I think many teams would love to just make it an error.

@cushon
Copy link
Collaborator Author

cushon commented Oct 31, 2014

Original comment posted by eaftan@google.com on 2012-09-13 at 12:40 AM


(No comment entered for this change.)


Labels: -Type-Defect, Type-NewCheck

@cushon
Copy link
Collaborator Author

cushon commented Oct 31, 2014

Original comment posted by kevinb@google.com on 2012-10-19 at 02:07 AM


(Hmm, I believe javac may do this already as of JDK 7)

@cushon
Copy link
Collaborator Author

cushon commented Oct 31, 2014

Original comment posted by eaftan@google.com on 2012-10-25 at 06:31 PM


I checked and javac 7 has a new Xlint option called "static" that checks for this and also accessing static fields from an instance. I'm working on a check for this anyway since we need to do the cleanup.

@cushon
Copy link
Collaborator Author

cushon commented Oct 31, 2014

Original comment posted by eaftan@google.com on 2012-11-08 at 01:02 AM


This check should also look for accesses to static fields from an instance.


Status: Accepted
Owner: eaftan@google.com

@cushon
Copy link
Collaborator Author

cushon commented Oct 31, 2014

Original comment posted by eaftan@google.com on 2012-11-08 at 01:02 AM


(No comment entered for this change.)


Status: Started

@cushon
Copy link
Collaborator Author

cushon commented Oct 31, 2014

Original comment posted by eaftan@google.com on 2013-02-11 at 08:07 PM


(No comment entered for this change.)


Labels: -Priority-Medium, Priority-High

@cushon
Copy link
Collaborator Author

cushon commented Oct 31, 2014

Original comment posted by supertri@google.com on 2013-11-20 at 01:26 AM


Liam is checking in this today.


Status: Fixed
Owner: cushon@google.com
CC: eaftan@google.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant