diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index 3ae2fa6739..ba778b55fe 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -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 diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/Report.java b/pmd-core/src/main/java/net/sourceforge/pmd/Report.java index 064b0ad231..b257537eb2 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/Report.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/Report.java @@ -417,7 +417,10 @@ public class Report implements Iterable { * * @return true if there are metrics, false * otherwise + * + * @deprecated see {@link StatisticalRule} */ + @Deprecated public boolean hasMetrics() { return !metrics.isEmpty(); } @@ -426,7 +429,10 @@ public class Report implements Iterable { * Iterate over the metrics. * * @return an iterator over the metrics + * + * @deprecated see {@link StatisticalRule} */ + @Deprecated public Iterator metrics() { return metrics.iterator(); }