[core] Remove deprecated method Report#merge
This commit is contained in:
2 files changed
+3
-30
No files matched your search
@@ -261,6 +261,7 @@ The following previously deprecated rules have been finally removed:
|
||||
{%jdoc core::PMDConfiguration#addRuleSet(java.lang.String) %} instead.
|
||||
* `setReportFile(String)` - use {%jdoc core::PMDConfiguration#setReportFile(java.nio.file.Path) %} instead.
|
||||
* `getReportFile()` - use {%jdoc core::PMDConfiguration#getReportFilePath() %} instead.
|
||||
* {%jdoc !!core::Report %} - method `merge(Report)` has been removed. Use {%jdoc core::Report#union(core::Report) %} instead.
|
||||
* pmd-apex
|
||||
* {%jdoc apex::lang.apex.ast.ApexNode %} and {% jdoc apex::lang.apex.ast.ASTApexFile %}
|
||||
* `#getApexVersion()`: In PMD 6, this method has been deprecated but was defined in the class `ApexRootNode`.
|
||||
|
||||
@@ -20,7 +20,6 @@ import net.sourceforge.pmd.annotation.Experimental;
|
||||
import net.sourceforge.pmd.annotation.InternalApi;
|
||||
import net.sourceforge.pmd.lang.document.FileId;
|
||||
import net.sourceforge.pmd.lang.document.TextFile;
|
||||
import net.sourceforge.pmd.renderers.AbstractAccumulatingRenderer;
|
||||
import net.sourceforge.pmd.reporting.FileAnalysisListener;
|
||||
import net.sourceforge.pmd.reporting.GlobalAnalysisListener;
|
||||
import net.sourceforge.pmd.util.BaseResultProducingCloseable;
|
||||
@@ -231,32 +230,6 @@ public final class Report {
|
||||
errors.add(error);
|
||||
}
|
||||
|
||||
/**
|
||||
* Merges the given report into this report. This might be necessary, if a
|
||||
* summary over all violations is needed as PMD creates one report per file
|
||||
* by default.
|
||||
*
|
||||
* <p>This is synchronized on an internal lock (note that other mutation
|
||||
* operations are not synchronized, todo for pmd 7).
|
||||
*
|
||||
* @param r the report to be merged into this.
|
||||
*
|
||||
* @see AbstractAccumulatingRenderer
|
||||
*
|
||||
* @deprecated Convert Renderer to use the reports.
|
||||
*/
|
||||
@Deprecated
|
||||
public void merge(Report r) {
|
||||
errors.addAll(r.errors);
|
||||
configErrors.addAll(r.configErrors);
|
||||
suppressedRuleViolations.addAll(r.suppressedRuleViolations);
|
||||
|
||||
for (RuleViolation violation : r.getViolations()) {
|
||||
addRuleViolation(violation);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns an unmodifiable list of violations that were suppressed.
|
||||
*/
|
||||
@@ -392,11 +365,10 @@ public final class Report {
|
||||
|
||||
/**
|
||||
* Creates a new report by combining this report with another report.
|
||||
* This is similar to {@link #merge(Report)}, but instead a new report
|
||||
* is created. The lowest start time and greatest end time are kept in the copy.
|
||||
* The lowest start time and greatest end time are kept in the copy.
|
||||
*
|
||||
* @param other the other report to combine
|
||||
* @return
|
||||
* @return a new report which is the combination of this and the other report.
|
||||
*/
|
||||
@Experimental
|
||||
public Report union(Report other) {
|
||||
|
||||
Reference in new issue
Block a user