File tree 2 files changed +5
-6
lines changed 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2005-2023 the original author or authors.
2
+ * Copyright 2005-2024 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
14
14
* limitations under the License.
15
15
*/
16
16
import groovy.json.JsonSlurper
17
- import groovy.xml.slurpersupport.GPathResult ;
18
17
19
18
File spotbugSarifFile = new File (basedir, ' target/spotbugsSarif.json' )
20
19
assert spotbugSarifFile. exists()
@@ -23,9 +22,9 @@ println '*******************'
23
22
println ' Checking SARIF file'
24
23
println ' *******************'
25
24
26
- def path = new JsonSlurper (). parse(spotbugSarifFile)
25
+ Map path = new JsonSlurper (). parse(spotbugSarifFile)
27
26
28
- def results = path. runs. results[0 ]
27
+ List results = path. runs. results[0 ]
29
28
println " BugInstance size is ${ results.size()} "
30
29
31
30
assert results. size() > 0
Original file line number Diff line number Diff line change @@ -26,9 +26,9 @@ String normalizePath(String path) {
26
26
return path. replaceAll(" \\\\ " ," /" );
27
27
}
28
28
29
- def slurpedResult = new JsonSlurper (). parse(spotbugSarifFile)
29
+ Map slurpedResult = new JsonSlurper (). parse(spotbugSarifFile)
30
30
31
- def results = slurpedResult. runs. results[0 ]
31
+ List results = slurpedResult. runs. results[0 ]
32
32
33
33
for (result in results) {
34
34
for (loc in result. locations) {
You can’t perform that action at this time.
0 commit comments