Use mirai TestOnly annotation in ServerListImpl.<init>

This commit is contained in:
Him188 2021-08-08 15:09:21 +08:00
parent 8d8aca3f1c
commit 40bbab4b5e
2 changed files with 3 additions and 3 deletions

View File

@ -14,6 +14,6 @@ import kotlin.annotation.AnnotationTarget.*
@RequiresOptIn("This can only be used in tests.", level = ERROR)
@Target(CLASS, FUNCTION, PROPERTY)
@Retention(AnnotationRetention.BINARY)
@Target(CLASS, FUNCTION, PROPERTY, CLASS, CONSTRUCTOR, FUNCTION)
@Retention(AnnotationRetention.SOURCE)
public annotation class TestOnly

View File

@ -13,8 +13,8 @@ import kotlinx.serialization.Serializable
import net.mamoe.mirai.internal.network.component.ComponentKey
import net.mamoe.mirai.internal.network.components.ServerList.Companion.DEFAULT_SERVER_LIST
import net.mamoe.mirai.utils.MiraiLogger
import net.mamoe.mirai.utils.TestOnly
import net.mamoe.mirai.utils.info
import org.jetbrains.annotations.TestOnly
import java.net.InetSocketAddress
import java.util.*