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

Anonymous classes are in some cases detected but never removed #33

Closed
marcphilipp opened this issue Jan 7, 2014 · 1 comment
Closed

Comments

@marcphilipp
Copy link
Member

package a;

public class AnonymousClassBug {

    Runnable a = new Runnable() {
        @Override
        public void run() {
            methodInsideAnonymousClass();
        }

        private void methodInsideAnonymousClass() {
        }
    };
}

The above class results in the following class graph:
usus-class-graph

Uncommenting the call to methodInsideAnonymousClass results in:
usus-class-graph-2

Removing the corresponding project from the set of Usus projects will not remove the anonymous class:
usus-class-graph-3

Looks like anonymous classes are detected accidentally when they call methods on themselves.

@marcphilipp
Copy link
Member Author

#32 might be related to this issue.

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