【发布时间】:2018-07-16 11:10:42
【问题描述】:
当 configList 为 null 时,AND 逻辑不应继续进行,但我收到此错误 - “数组索引超出范围”。
以下是规则:
rule "testRule"
when
config : Config( configList != null && !configList.empty && configList[0].attribute != null )
then
// logic
end
【问题讨论】:
-
在回答您的问题之前,您是否知道检查 null 与检查“emptiness”不同?
-
您好,我知道区别,但我发布了错误的代码,请检查编辑后的代码,因为它仍然给出相同的错误。
标签: drools rules business-rules mvel