Deprecate Report::hasMetrics and Report::metrics

This commit is contained in:
Clément Fournier
2019-09-06 17:34:02 +02:00
parent bb0379ef4f
commit f449cc72e3
2 changed files with 8 additions and 1 deletions

View File

@ -80,7 +80,8 @@ about the usage and features of the rule designer.
* The method {% jdoc !!core::processor.AbstractPMDProcessor#filenameFrom(DataSource) %} has been
deprecated. It was used to determine a "short name" of the file being analyzed, so that the report
can use short names. However, this logic has been moved to the renderers.
* The method {% jdoc !!core::Report#metrics() %} and {% jdoc core::Report::hasMetrics() %} have
been deprecated. They were leftovers from a previous deprecation round targeting {% jdoc core::lang.rule.StatisticalRule %}.
##### Internal APIs

View File

@ -417,7 +417,10 @@ public class Report implements Iterable<RuleViolation> {
*
* @return <code>true</code> if there are metrics, <code>false</code>
* otherwise
*
* @deprecated see {@link StatisticalRule}
*/
@Deprecated
public boolean hasMetrics() {
return !metrics.isEmpty();
}
@ -426,7 +429,10 @@ public class Report implements Iterable<RuleViolation> {
* Iterate over the metrics.
*
* @return an iterator over the metrics
*
* @deprecated see {@link StatisticalRule}
*/
@Deprecated
public Iterator<Metric> metrics() {
return metrics.iterator();
}