@@ -60,7 +60,7 @@ private val READ_TIMEOUT = Duration.ofSeconds(60)
60
60
/* *
61
61
* A wrapper for [Nexus IQ Server](https://help.sonatype.com/iqserver) security vulnerability data.
62
62
*/
63
- class NexusIq (name : String , private val nexusIqConfig : NexusIqConfiguration ) : AdviceProvider(name) {
63
+ class NexusIq (name : String , private val config : NexusIqConfiguration ) : AdviceProvider(name) {
64
64
companion object : Logging
65
65
66
66
class Factory : AbstractAdviceProviderFactory <NexusIq >(" NexusIQ" ) {
@@ -71,9 +71,9 @@ class NexusIq(name: String, private val nexusIqConfig: NexusIqConfiguration) : A
71
71
72
72
private val service by lazy {
73
73
NexusIqService .create(
74
- nexusIqConfig .serverUrl,
75
- nexusIqConfig .username,
76
- nexusIqConfig .password,
74
+ config .serverUrl,
75
+ config .username,
76
+ config .password,
77
77
OkHttpClientHelper .buildClient {
78
78
readTimeout(READ_TIMEOUT )
79
79
}
@@ -131,7 +131,7 @@ class NexusIq(name: String, private val nexusIqConfig: NexusIqConfiguration) : A
131
131
private fun NexusIqService.SecurityIssue.toVulnerability (): Vulnerability {
132
132
val references = mutableListOf<VulnerabilityReference >()
133
133
134
- val browseUrl = URI (" ${nexusIqConfig .browseUrl} /assets/index.html#/vulnerabilities/$reference " )
134
+ val browseUrl = URI (" ${config .browseUrl} /assets/index.html#/vulnerabilities/$reference " )
135
135
val nexusIqReference = VulnerabilityReference (browseUrl, scoringSystem(), severity.toString())
136
136
137
137
references + = nexusIqReference
@@ -149,7 +149,7 @@ class NexusIq(name: String, private val nexusIqConfig: NexusIqConfiguration) : A
149
149
components : List <NexusIqService .Component >
150
150
): NexusIqService .ComponentDetailsWrapper =
151
151
try {
152
- logger.debug { " Querying component details from ${nexusIqConfig .serverUrl} ." }
152
+ logger.debug { " Querying component details from ${config .serverUrl} ." }
153
153
service.getComponentDetails(NexusIqService .ComponentsWrapper (components))
154
154
} catch (e: HttpException ) {
155
155
throw IOException (e)
0 commit comments