20
20
21
21
class ReporterManager {
22
22
23
- private List <ReporterOptions > reporterOptionsList ;
24
- private List <Throwable > reporterGatherErrors ;
23
+ private final List <ReporterOptions > reporterOptionsList ;
24
+ private List <Exception > reporterGatherErrors ;
25
25
private ExecutorService executorService ;
26
26
27
27
ReporterManager (ReporterConfig [] reporterConfigs ) {
@@ -55,12 +55,12 @@ private ReporterOptions getDefaultReporterOption() {
55
55
return new ReporterOptions (CoreReporters .UT_DOCUMENTATION_REPORTER .name ());
56
56
}
57
57
58
- private void abortGathering (Throwable e ) {
58
+ private void abortGathering (Exception e ) {
59
59
addGatherError (e );
60
60
executorService .shutdownNow ();
61
61
}
62
62
63
- private void addGatherError ( Throwable e ) {
63
+ private void addGatherError ( Exception e ) {
64
64
if ( reporterGatherErrors == null ) {
65
65
reporterGatherErrors = new ArrayList <>();
66
66
}
@@ -71,7 +71,7 @@ boolean haveGatherErrorsOccured() {
71
71
return reporterGatherErrors != null && !reporterGatherErrors .isEmpty ();
72
72
}
73
73
74
- List <Throwable > getGatherErrors () {
74
+ List <Exception > getGatherErrors () {
75
75
return reporterGatherErrors ;
76
76
}
77
77
@@ -127,11 +127,11 @@ List<ReporterOptions> getReporterOptionsList() {
127
127
*/
128
128
private static class GatherReporterOutputTask implements Runnable {
129
129
130
- private DataSource dataSource ;
131
- private ReporterOptions option ;
132
- private Consumer <Throwable > abortFunction ;
130
+ private final DataSource dataSource ;
131
+ private final ReporterOptions option ;
132
+ private final Consumer <Exception > abortFunction ;
133
133
134
- GatherReporterOutputTask ( DataSource dataSource , ReporterOptions reporterOption , Consumer <Throwable > abortFunction ) {
134
+ GatherReporterOutputTask ( DataSource dataSource , ReporterOptions reporterOption , Consumer <Exception > abortFunction ) {
135
135
136
136
if ( reporterOption .getReporterObj () == null )
137
137
throw new IllegalArgumentException ("Reporter " + reporterOption .getReporterName () + " is not initialized" );
0 commit comments