File tree Expand file tree Collapse file tree 5 files changed +8
-9
lines changed Expand file tree Collapse file tree 5 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ internal class ScanController(
166
166
/* *
167
167
* Return all [KnownProvenance]s contained in [nestedProvenances].
168
168
*/
169
- fun getAllProvenances (): Set <KnownProvenance > =
169
+ fun getAllProvenances (): Set <RemoteProvenance > =
170
170
nestedProvenances.values.flatMapTo(mutableSetOf ()) { it.allProvenances }
171
171
172
172
/* *
Original file line number Diff line number Diff line change @@ -570,12 +570,12 @@ class Scanner(
570
570
}
571
571
572
572
private fun scanPath (
573
- provenance : KnownProvenance ,
573
+ provenance : RemoteProvenance ,
574
574
scanners : List <PathScannerWrapper >,
575
575
context : ScanContext
576
576
): Map <PathScannerWrapper , ScanResult > {
577
577
val downloadDir = try {
578
- provenanceDownloader.download(provenance as RemoteProvenance )
578
+ provenanceDownloader.download(provenance)
579
579
} catch (e: DownloadException ) {
580
580
val issue = createAndLogIssue(
581
581
" Downloader" , " Could not download provenance $provenance : ${e.collectMessages()} "
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ data class NestedProvenance(
33
33
/* *
34
34
* The root provenance that contains the [nested provenances][subRepositories].
35
35
*/
36
- val root : KnownProvenance ,
36
+ val root : RemoteProvenance ,
37
37
38
38
/* *
39
39
* If [root] is a [RepositoryProvenance] this map contains all paths which contain nested repositories associated
@@ -46,7 +46,7 @@ data class NestedProvenance(
46
46
* The set of all contained [KnownProvenance]s.
47
47
*/
48
48
@JsonIgnore
49
- val allProvenances: Set <KnownProvenance > =
49
+ val allProvenances: Set <RemoteProvenance > =
50
50
buildSet {
51
51
add(root)
52
52
addAll(subRepositories.values)
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ data class NestedProvenanceScanResult(
39
39
/* *
40
40
* A map of [KnownProvenance]s from [nestedProvenance] associated with lists of [ScanResult]s.
41
41
*/
42
- val scanResults : Map <KnownProvenance , List <ScanResult >>
42
+ val scanResults : Map <RemoteProvenance , List <ScanResult >>
43
43
) {
44
44
/* *
45
45
* Return true if [scanResults] contains at least one scan result for each of the [KnownProvenance]s contained in
@@ -108,7 +108,7 @@ data class NestedProvenanceScanResult(
108
108
}
109
109
}
110
110
111
- fun KnownProvenance .withVcsPath () =
111
+ fun RemoteProvenance .withVcsPath () =
112
112
when (this ) {
113
113
is RepositoryProvenance -> {
114
114
val pathWithinProvenance = pathsWithinProvenances.getValue(this )
Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ import org.ossreviewtoolkit.downloader.DownloadException
29
29
import org.ossreviewtoolkit.downloader.Downloader
30
30
import org.ossreviewtoolkit.downloader.WorkingTreeCache
31
31
import org.ossreviewtoolkit.model.ArtifactProvenance
32
- import org.ossreviewtoolkit.model.KnownProvenance
33
32
import org.ossreviewtoolkit.model.Package
34
33
import org.ossreviewtoolkit.model.RemoteProvenance
35
34
import org.ossreviewtoolkit.model.RepositoryProvenance
@@ -62,7 +61,7 @@ fun interface ProvenanceDownloader {
62
61
// Use the provenanceDownloader to download each provenance from nestedProvenance separately, because they are
63
62
// likely already cached if a path scanner wrapper is used.
64
63
65
- val root = download(nestedProvenance.root as RemoteProvenance )
64
+ val root = download(nestedProvenance.root)
66
65
67
66
nestedProvenance.subRepositories.forEach { (path, provenance) ->
68
67
val tempDir = download(provenance)
You can’t perform that action at this time.
0 commit comments