Skip to content

Commit bb18ea1

Browse files
committed
Some Refactorings and make things final
1 parent f47c0de commit bb18ea1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/main/java/org/utplsql/cli/ReporterManager.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020

2121
class ReporterManager {
2222

23-
private List<ReporterOptions> reporterOptionsList;
24-
private List<Throwable> reporterGatherErrors;
23+
private final List<ReporterOptions> reporterOptionsList;
24+
private List<Exception> reporterGatherErrors;
2525
private ExecutorService executorService;
2626

2727
ReporterManager(ReporterConfig[] reporterConfigs ) {
@@ -55,12 +55,12 @@ private ReporterOptions getDefaultReporterOption() {
5555
return new ReporterOptions(CoreReporters.UT_DOCUMENTATION_REPORTER.name());
5656
}
5757

58-
private void abortGathering(Throwable e) {
58+
private void abortGathering(Exception e) {
5959
addGatherError(e);
6060
executorService.shutdownNow();
6161
}
6262

63-
private void addGatherError( Throwable e ) {
63+
private void addGatherError( Exception e ) {
6464
if ( reporterGatherErrors == null ) {
6565
reporterGatherErrors = new ArrayList<>();
6666
}
@@ -71,7 +71,7 @@ boolean haveGatherErrorsOccured() {
7171
return reporterGatherErrors != null && !reporterGatherErrors.isEmpty();
7272
}
7373

74-
List<Throwable> getGatherErrors() {
74+
List<Exception> getGatherErrors() {
7575
return reporterGatherErrors;
7676
}
7777

@@ -127,11 +127,11 @@ List<ReporterOptions> getReporterOptionsList() {
127127
*/
128128
private static class GatherReporterOutputTask implements Runnable {
129129

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;
133133

134-
GatherReporterOutputTask( DataSource dataSource, ReporterOptions reporterOption, Consumer<Throwable> abortFunction ) {
134+
GatherReporterOutputTask( DataSource dataSource, ReporterOptions reporterOption, Consumer<Exception> abortFunction ) {
135135

136136
if ( reporterOption.getReporterObj() == null )
137137
throw new IllegalArgumentException("Reporter " + reporterOption.getReporterName() + " is not initialized");

0 commit comments

Comments
 (0)