Alex Rivera | Logout

Can findbugs detect unused public methods

Asked 2011-01-18T06:32:10.570
10

Is it possible to detect unused methods in a source tree using FindBugs? I see some posts on SO where users are claiming to do that, some others asking how to do this in FB and others where they claim FB cannot do this.

Does anyone know for sure how this is done? I am only interested in methods that are not explicitly called from elsewhere, I don't care about reflection.

Edit
Report

1 Answer

0

Maybe crap4j is what you need. It removes all code that is not reached by unit tests. This is of course the hard way to minimize your app.

answered 2011-01-18T07:27:31.493

Your Answer