Mantis - Resin
Viewing Issue Advanced Details
4462 minor always 03-28-11 15:24 04-06-11 13:12
jhartline  
ferg  
normal  
closed 4.0.10  
fixed  
none    
none 4.0.17  
0004462: Unable to access public getter from JSP when a method with the same name and a single int parameter exists.
When accessing bean methods in a java bean, a javax.el.PropertyNotFoundException is thrown if there is a method that has the same name as the requested method but contains a single int parameter.

eg..

A bean containing the following methods...
getFoo() {
   return foo;
}
getFoo(int id) {
   return foos[id];
}

will fail when accessed like so.. (in a JSP file that has been somehow passed an instance of the bean)
${myBean.foo}
with a javax.el.PropertyNotFoundException


I've constructed similar scenarios and it seems that this only occurs with ints. I've not exhaustively tested primitives, but float and double seem to work as well as all the Object parameters I've tested with.

This seems to happen for every instance of this that I've tried. (fully reproducible)

Notes
(0005166)
ferg   
04-06-11 13:12   
jsp/30ci