Skip to content

Commit

Permalink
chore: Make OkHttpClientHelper the first class in the file
Browse files Browse the repository at this point in the history
`OkHttpClientHelper` should go frist as the file is named after it.

Signed-off-by: Sebastian Schuberth <[email protected]>
  • Loading branch information
sschuberth committed Oct 6, 2023
1 parent f12b1ae commit 89aeb50
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions utils/ort/src/main/kotlin/OkHttpClientHelper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand All @@ -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"
Expand Down

0 comments on commit 89aeb50

Please sign in to comment.