Skip to content

Commit c794f91

Browse files
committed
chore(gradle-plugin): Remove some superfluous null checks
This is a fixup for 1d8bd43. Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.io>
1 parent 61fe585 commit c794f91

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

plugins/package-managers/gradle-plugin/src/main/kotlin/GradleModelExtensions.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ internal fun UrlArtifactRepository.toOrtRepository(): OrtRepository {
7979
?.any { it is HttpHeaderAuthentication } == true
8080

8181
return if (isHttpHeaderAuth) {
82-
val headerCredentials = authSupported?.getCredentials(HttpHeaderCredentials::class.java)
82+
val headerCredentials = authSupported.getCredentials(HttpHeaderCredentials::class.java)
8383
OrtRepositoryImpl(
8484
url = url.toString(),
8585
username = null,
8686
password = null,
87-
headerName = headerCredentials?.name,
88-
headerValue = headerCredentials?.value
87+
headerName = headerCredentials.name,
88+
headerValue = headerCredentials.value
8989
)
9090
} else {
9191
val credentials = authSupported?.credentials

0 commit comments

Comments
 (0)