mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-25 15:40:28 +08:00
Check Requirement.rule on init
This commit is contained in:
parent
1657fbd5ac
commit
52eaf56e5a
@ -94,6 +94,14 @@ internal constructor(
|
||||
*/
|
||||
val rule: String,
|
||||
) {
|
||||
init {
|
||||
kotlin.runCatching {
|
||||
parseRangeRequirement(rule)
|
||||
}.onFailure {
|
||||
throw java.lang.IllegalArgumentException("Syntax error: $rule", it)
|
||||
}
|
||||
}
|
||||
|
||||
@Transient
|
||||
private val impl = SemVersionInternal.parseRangeRequirement(rule)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user