From 5310e19861797effd632098607ba558b372b729d Mon Sep 17 00:00:00 2001 From: Him188 Date: Fri, 28 Feb 2020 12:44:37 +0800 Subject: [PATCH] Suppress false positive warnings --- .../src/commonMain/kotlin/net.mamoe.mirai/utils/platform.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/platform.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/platform.kt index 4e15bb879..e4afa6360 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/platform.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/platform.kt @@ -46,6 +46,7 @@ expect fun localIpAddress(): String */ expect val Http: HttpClient +@Suppress("DuplicatedCode") // false positive. `this` is not the same for `List` and `ByteArray` internal fun ByteArray.checkOffsetAndLength(offset: Int, length: Int) { require(offset >= 0) { "offset shouldn't be negative: $offset" } require(length >= 0) { "length shouldn't be negative: $length" }