If I have an anonymous inner class object like this (where Foo is an interface):
Foo foo = new Foo(){
  @Override
  public String hello(Object dummyArg){
    return "hello, world.";
  }
};
and I try to call Foo.hello from a jsp like this:
${foo.hello('blah')}
it throws:
javax.el.MethodNotFoundException: Unable to find method [hello] with [1] parameters
but if there are no parameters:
Bar bar = new bar(){
  @Override
  public String hello(){
    return "hello, world.";
  }
};
...
${bar.hello()}
it works fine. Why?
This is not a duplicate of 7121303. I'm asking specifically about anonymous inner classes. With an instance of a regular class, it works with any number of parameters.
 
     
     
    