equal
deleted
inserted
replaced
37 * |
37 * |
38 * @author Peter von der Ahé |
38 * @author Peter von der Ahé |
39 * @since 1.6 |
39 * @since 1.6 |
40 */ |
40 */ |
41 public final class DiagnosticCollector<S> implements DiagnosticListener<S> { |
41 public final class DiagnosticCollector<S> implements DiagnosticListener<S> { |
42 private List<Diagnostic<? extends S>> diagnostics = |
42 private List<Diagnostic<? extends S>> diagnostics = Collections.synchronizedList(new ArrayList<>()); |
43 Collections.synchronizedList(new ArrayList<Diagnostic<? extends S>>()); |
|
44 |
43 |
45 public void report(Diagnostic<? extends S> diagnostic) { |
44 public void report(Diagnostic<? extends S> diagnostic) { |
46 diagnostic.getClass(); // null check |
45 diagnostic.getClass(); // null check |
47 diagnostics.add(diagnostic); |
46 diagnostics.add(diagnostic); |
48 } |
47 } |