From 5468a380f2b8985ee3bcca990d4c1d3fdb7a2035 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Sat, 12 Dec 2015 01:10:44 +0400 Subject: [PATCH] Simplify. --- src/main/kotlin/com/beust/kobalt/maven/UnversionedDep.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/com/beust/kobalt/maven/UnversionedDep.kt b/src/main/kotlin/com/beust/kobalt/maven/UnversionedDep.kt index 340916f2..0b8c1c18 100644 --- a/src/main/kotlin/com/beust/kobalt/maven/UnversionedDep.kt +++ b/src/main/kotlin/com/beust/kobalt/maven/UnversionedDep.kt @@ -8,9 +8,8 @@ import java.io.File * eventually resolve to the latest version of the artifact. */ open class UnversionedDep(open val groupId: String, open val artifactId: String) { - open fun toMetadataXmlPath(fileSystem: Boolean = true, isLocal: Boolean): String { - return toDirectory("", fileSystem) + if (isLocal) "maven-metadata-local.xml" else "maven-metadata.xml" - } + open fun toMetadataXmlPath(fileSystem: Boolean = true, isLocal: Boolean) = + toDirectory("", fileSystem) + if (isLocal) "maven-metadata-local.xml" else "maven-metadata.xml" /** * Turn this dependency to a directory. If fileSystem is true, use the file system