1
2
3
4 package net.sourceforge.pmd;
5
6 import net.sourceforge.pmd.stat.Metric;
7
8
9
10
11 public final class SynchronizedReportListener implements ReportListener {
12
13 private final ReportListener wrapped;
14
15
16
17
18
19
20
21 public SynchronizedReportListener(ReportListener listener) {
22 this.wrapped = listener;
23 }
24
25
26
27
28 public synchronized void ruleViolationAdded(RuleViolation ruleViolation) {
29 wrapped.ruleViolationAdded(ruleViolation);
30 }
31
32
33
34
35 public synchronized void metricAdded(Metric metric) {
36 wrapped.metricAdded(metric);
37 }
38
39 }