Java dead code detection at runtime

In development, we use EclEmma to check for good test coverage. Since we are starting now, the big refactoring task, including many source files, needs to be replaced, I wonder if it is possible to run something like this on our servers to make sure that we do not forget to delete some classes or methods.

Since the frameworks we use do a lot of DI and Reflections, static code analysis will not help.

Is there anything parsing in rumtime if all my classes and mothods were called at server runtime?

Regards, Michael

EDIT: this analysis will not be performed during the production process, but at the integration / acceptance test stage. It was not intended as the final answer for removing all recognized classes / methods, but as a hint / reminder of what to remove.

EDIT 2: explaining why this question should be closed will be enjoyable

+4
source share
1 answer

Try the Cobertura tool, it helps to analyze better, but I'm not sure if it will satisfy your need or not.

0
source

Source: https://habr.com/ru/post/1617962/


All Articles