From a95c227554096e1d730035396a37265c75e5dd8a Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Mon, 8 Feb 2016 23:21:13 +0400 Subject: [PATCH] Refactor. --- .../src/main/kotlin/com/beust/kobalt/maven/RepoFinder.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/maven/RepoFinder.kt b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/maven/RepoFinder.kt index 6ec4b029..4acdb496 100644 --- a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/maven/RepoFinder.kt +++ b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/maven/RepoFinder.kt @@ -25,10 +25,8 @@ import javax.xml.xpath.XPathFactory * Find the repo that contains the given dependency among a list of repos. Searches are performed in parallel and * cached so we never make a network call for the same dependency more than once. */ -public class RepoFinder @Inject constructor(val executors: KobaltExecutors) { - public fun findCorrectRepo(id: String): RepoResult { - return FOUND_REPOS.get(id) - } +class RepoFinder @Inject constructor(val executors: KobaltExecutors) { + fun findCorrectRepo(id: String) = FOUND_REPOS.get(id) data class RepoResult(val hostConfig: HostConfig, val found: Boolean, val version: Version? = null, val hasJar: Boolean = true, val snapshotVersion: Version? = null)