diff --git a/kirc-image/src/main/kotlin/de/cmdjulian/kirc/image/ContainerImageName.kt b/kirc-image/src/main/kotlin/de/cmdjulian/kirc/image/ContainerImageName.kt index 307ad76..e119a87 100644 --- a/kirc-image/src/main/kotlin/de/cmdjulian/kirc/image/ContainerImageName.kt +++ b/kirc-image/src/main/kotlin/de/cmdjulian/kirc/image/ContainerImageName.kt @@ -44,7 +44,7 @@ class ContainerImageName( digest: Digest? = this.digest, ) = ContainerImageName(registry, repository, tag, digest) - override fun compareTo(other: ContainerImageName): Int = this.toString().compareTo(other.toString()) + override fun compareTo(other: ContainerImageName): Int = toString().compareTo(other.toString()) override fun equals(other: Any?): Boolean = when { this === other -> true diff --git a/kirc-image/src/main/kotlin/de/cmdjulian/kirc/image/Reference.kt b/kirc-image/src/main/kotlin/de/cmdjulian/kirc/image/Reference.kt index 8638347..a9382d8 100644 --- a/kirc-image/src/main/kotlin/de/cmdjulian/kirc/image/Reference.kt +++ b/kirc-image/src/main/kotlin/de/cmdjulian/kirc/image/Reference.kt @@ -39,7 +39,6 @@ class Digest(@JsonValue private val value: String) : Reference, Comparable { require(value.matches(regex)) { "invalid registry" } } - override fun compareTo(other: Registry): Int = value.compareTo(value) + override fun compareTo(other: Registry): Int = value.compareTo(other.value) override fun equals(other: Any?): Boolean = other is Registry && other.value == value override fun hashCode(): Int = value.hashCode() override fun toString(): String = value diff --git a/kirc-image/src/main/kotlin/de/cmdjulian/kirc/image/Repository.kt b/kirc-image/src/main/kotlin/de/cmdjulian/kirc/image/Repository.kt index 8877d8d..23432fe 100644 --- a/kirc-image/src/main/kotlin/de/cmdjulian/kirc/image/Repository.kt +++ b/kirc-image/src/main/kotlin/de/cmdjulian/kirc/image/Repository.kt @@ -18,7 +18,7 @@ class Repository(@JsonValue private val value: String) : Comparable is Digest -> ContainerImageName(repository = this, digest = reference) } - override fun compareTo(other: Repository): Int = value.compareTo(value) + override fun compareTo(other: Repository): Int = value.compareTo(other.value) override fun equals(other: Any?): Boolean = other is Repository && other.value == value override fun hashCode(): Int = value.hashCode() override fun toString(): String = value