Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

deadcode4j v2.1.0: False Positives

sebastiankirsch edited this page Feb 11, 2016 · 1 revision

deadcode4j neither knows each and every framework nor does it recognize all corner cases of those frameworks it supports. That said, classes reported as being dead may not necessarily be dead. So, don't delete blindly, but double-check the results. Known caveats are:

  • deadcode4j does not consider test code, so classes used in tests only are deemed to be dead (this is a hint to move such classes to the test src).
  • Java reflection. There's no cure for that.
  • Finally, if the analyzed project isn't closed but represents more of a public API or library, expect deadcode4j to report many classes which are indeed used by other projects.

If you know of any other false positives, please report an issue.

In general, I recommend using ack to manually double-check if a class is really dead.
Also, inspecting the implemented interfaces, the superclasses and annotations of a supposedly dead class should be done before finally dumping the code.