cobertura/cobertura — pull request #98 by stevesaliman (2013-11-23 17:16:40+00:00)
Title: Created a static method that plugins can call that doesn't perform a Sys...

The class that performs a coverage check uses ```System.exit```, which creates challenges for plugin authors. For example, in the Gradle cobertura plugin, we want to check coverage, but we don't want the build to fail when the coverage levels are too low - especially when the user has chosen to use the ```coverageCheckHaltOnFailure = false`` option.

The change I'm proposing creates a new method that does the work of the check but does not exit. Plugins can invoke this method to get a result. The ```main``` method currently calls this new method and does a ```System.exit``` with the result for backwards compatibility. The class constructor is not really needed anymore, but it could be kept in case anyone is using it directly.

Also: I noticed that all the ```Main``` classes for instrumentation, reporting, etc have changed names. This will cause any code trying to access Cobertura classes, such as existing plugins, to break when 2.0.4 is released. It might be a good idea to restore those class names to ```Main```. This is particularly useful for plugins that are not tied to a particular Cobertura version.