我正在尝试定义一个非常简单的函数,Drools
如下所示:
import java.util.List;
function int sumLengths(List<String> strings) {
int counter = 0;
for (String s : strings)
counter += s.length();
return counter;
}
但它给了我错误:
Exception in thread "main" java.lang.RuntimeException: [ function sumLengths (line:5):
Unable to resolve type List<String> while building function. java.lang.ClassNotFoundException: Unable to find class 'List<String>' ]
任何的想法?