39
39
import java .io .UncheckedIOException ;
40
40
import java .util .HashMap ;
41
41
import java .util .List ;
42
+ import java .util .Map ;
42
43
import java .util .regex .Matcher ;
43
44
import java .util .regex .Pattern ;
44
45
import java .io .BufferedReader ;
@@ -90,11 +91,11 @@ public void run() {
90
91
// name prefixes. For each job prefix we keep two issues, one for
91
92
// quarkus integration tests and the other for mandrel integration
92
93
// tests.
93
- final HashMap <GHIssue , String > issues = new HashMap <>();
94
- final HashMap <GHIssue , String > mandrelITIssues = new HashMap <>();
94
+ final Map <GHIssue , String > issues = new HashMap <>();
95
+ final Map <GHIssue , String > mandrelITIssues = new HashMap <>();
95
96
// We use two more HashMaps to associate issues with known job failures
96
- final HashMap <GHIssue , List <GHWorkflowJob >> failedMandrelJobs = new HashMap <>();
97
- final HashMap <GHIssue , List <GHWorkflowJob >> failedMandrelITJobs = new HashMap <>();
97
+ final Map <GHIssue , List <GHWorkflowJob >> failedMandrelJobs = new HashMap <>();
98
+ final Map <GHIssue , List <GHWorkflowJob >> failedMandrelITJobs = new HashMap <>();
98
99
99
100
// Get the github issue number and repository from the logs
100
101
//
@@ -153,7 +154,7 @@ public void run() {
153
154
}
154
155
155
156
156
- private void recordFailedJob (final HashMap <GHIssue , List <GHWorkflowJob >> failedJobs , HashMap <GHIssue , String > issues , GHWorkflowJob job ) {
157
+ private void recordFailedJob (final Map <GHIssue , List <GHWorkflowJob >> failedJobs , Map <GHIssue , String > issues , GHWorkflowJob job ) {
157
158
for (GHIssue issue : issues .keySet ()) {
158
159
if (job .getName ().startsWith (issues .get (issue ))) {
159
160
List <GHWorkflowJob > failedJobsList = failedJobs .get (issue );
@@ -205,8 +206,8 @@ private void reportFailedJobs(GHIssue issue, List<GHWorkflowJob> failedJobs) thr
205
206
}
206
207
207
208
208
- private void processLogs (GitHub github , GHWorkflowJob job , HashMap <GHIssue , String > issues , HashMap <GHIssue , String > mandrelITIssues ,
209
- TriConsumer <GHIssue , GHWorkflowJob , HashMap <GHIssue , String >> process , String ... filters ) {
209
+ private void processLogs (GitHub github , GHWorkflowJob job , Map <GHIssue , String > issues , Map <GHIssue , String > mandrelITIssues ,
210
+ TriConsumer <GHIssue , GHWorkflowJob , Map <GHIssue , String >> process , String ... filters ) {
210
211
String fullContent = getJobsLogs (job , filters );
211
212
if (fullContent .isEmpty ()) {
212
213
return ;
@@ -242,7 +243,7 @@ private void processLogs(GitHub github, GHWorkflowJob job, HashMap<GHIssue, Stri
242
243
}
243
244
}
244
245
245
- private void processITJobs (GHIssue issue , GHWorkflowJob job , HashMap <GHIssue , String > issues ) {
246
+ private void processITJobs (GHIssue issue , GHWorkflowJob job , Map <GHIssue , String > issues ) {
246
247
if (issue == null ) {
247
248
System .out .println (String .format ("Unable to find the issue %s in project %s" , issue .getNumber (), issue .getRepository ().getName ()));
248
249
System .exit (-1 );
@@ -256,7 +257,7 @@ private void processITJobs(GHIssue issue, GHWorkflowJob job, HashMap<GHIssue, St
256
257
}
257
258
}
258
259
259
- private void processSyncJobs (GHIssue issue , GHWorkflowJob job , HashMap <GHIssue , String > issues ) {
260
+ private void processSyncJobs (GHIssue issue , GHWorkflowJob job , Map <GHIssue , String > issues ) {
260
261
try {
261
262
if (issue == null ) {
262
263
System .out .println (String .format ("Unable to find the issue %s in project %s" , issue .getNumber (), issue .getRepository ().getName ()));
0 commit comments