我有以下课程
private static class Person{
private int iq;
private Person[] minions;
public int getIq() {
return iq;
}
public Person[] getMinions() {
return minions;
}
}
我正在针对此代码尝试以下 MVEL (1.3.16-java1.6) 表达式
count = 0;
foreach (minion : minions){
if (minions[count].iq > 120) {
return true;
}
}
return false;
然而 MVEL 似乎在minions[count].iq
(或什至minions[0].iq
)构造方面存在问题。
任何输入将不胜感激。编译器确切的抱怨是
Caused by: java.lang.IllegalAccessException: Class org.mvel.optimizers.impl.asm.ASMAccessorOptimizer can not access a member of class Person with modifiers "public"