From: Darío T. N. <dar...@ho...> - 2011-11-30 08:07:41
|
Hello Using Cobertura through Sonar 2.11 (I'm sorry, I still haven't find the Cobertura version used) I realized that a class with a single private constructor detects as uncovered code that constructor if there's no an static instance of the class (just as it should, since the constructor has never been used) However, the constructor can't be used unless with a singleton pattern (a factory one would detect the factory methods as covered or not, and then it will be reasonable to mark the constructor too) so I think to detect that could be an improvement, to let the use of utility classes. Kind regards |