Commit 48362a24 authored by Him188's avatar Him188

Add check: ForwardMessage.nodeList mustn't be empty

parent 6a631418
...@@ -84,6 +84,12 @@ class ForwardMessage @JvmOverloads constructor( ...@@ -84,6 +84,12 @@ class ForwardMessage @JvmOverloads constructor(
val nodeList: Collection<INode>, val nodeList: Collection<INode>,
val displayStrategy: DisplayStrategy = DisplayStrategy val displayStrategy: DisplayStrategy = DisplayStrategy
) : MessageContent { ) : MessageContent {
init {
require(nodeList.isNotEmpty()) {
"Forward nodeList mustn't be empty"
}
}
/** /**
* @see ForwardMessage * @see ForwardMessage
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment