java - MVEL nested property resolution issue -


i have following class

private static class person{     private int iq;       private person[] minions;      public int getiq() {         return iq;     }     public person[] getminions() {         return minions;     }  } 

i'm trying out following mvel (1.3.16-java1.6) expression against code

count = 0; foreach (minion : minions){      if (minions[count].iq > 120) {          return true;     }  } return false; 

however mvel seems have problems minions[count].iq (or minions[0].iq) construct.

any inputs appreciated. compilers exact grouse is

caused by: java.lang.illegalaccessexception: class org.mvel.optimizers.impl.asm.asmaccessoroptimizer can not access member of class person modifiers "public" 

your person class private, assume not visible asmaccessoroptimizer or if would, asmaccessoroptimizer not have rights access it.

declaring person public should solve issue.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -