override fun compareTo()

in plugin-dotnet-agent/src/main/kotlin/jetbrains/buildServer/agent/Version.kt [43:54]


    override fun compareTo(other: Version): Int {
        major.compareTo(other.major).run { if (this != 0) return this }
        minor.compareTo(other.minor).run { if (this != 0) return this }
        patch.compareTo(other.patch).run { if (this != 0) return this }
        build.compareTo(other.build).run { if (this != 0) return this }
        minorBuild.compareTo(other.minorBuild).run { if (this != 0) return this }
        return if (release == null) {
            if (other.release == null) 0 else 1
        } else {
            if (other.release == null) -1 else release.compareTo(other.release)
        }
    }