diff --git a/utils/ort/src/main/kotlin/OkHttpClientHelper.kt b/utils/ort/src/main/kotlin/OkHttpClientHelper.kt index 80bc78f91eeec..d86badc2a4237 100644 --- a/utils/ort/src/main/kotlin/OkHttpClientHelper.kt +++ b/utils/ort/src/main/kotlin/OkHttpClientHelper.kt @@ -55,11 +55,6 @@ import java.lang.invoke.MethodHandles typealias BuilderConfiguration = OkHttpClient.Builder.() -> Unit -/** - * An HTTP-specific download error that enriches an [IOException] with an additional HTTP error code. - */ -class HttpDownloadError(val code: Int, message: String) : IOException("$message (HTTP code $code)") - /** * A helper class to manage OkHttp instances backed by distinct cache directories. */ @@ -81,6 +76,11 @@ object OkHttpClientHelper { } ?: okHttpClient } +/** + * An HTTP-specific download error that enriches an [IOException] with an additional HTTP error code. + */ +class HttpDownloadError(val code: Int, message: String) : IOException("$message (HTTP code $code)") + private val logger = loggerOf(MethodHandles.lookup().lookupClass()) private const val CACHE_DIRECTORY = "cache/http"