This bug comes from the JavaBean spec that defines the "get*" methods to
acces javabean properties. JavaBeans can have "indexed" properties if
they have a getter with an index param. In your case, two getters exist
for the same "property", according to strict JavaBean spec.
1.4.2_05 may not support indexed properties, or fallback to simple
property when confusing methods are found, and 1.4.2_12 does not
consider the getter to be "acceptable" getters for a JavaBean property,
or something like this. Those 2 versions of the JDK handle in a
different way, but you should not consider this to be a JDK bug : your
bean is not compilant with JavaBean spec.
In any case, rename your getters to avoid name conflicts. You can have
same troubles in some JRE if getter / setter does not have the same type
as returned valu / param.
Capaul Giachen F. (KISX 41) a écrit :
Hi all,
A developer of ours has a Bean class which looks something like this:
public class Level1 {
public String getLevel(){
return "level1";
}
public String getLevel(int dummy){
return "int method level1";
}
}
Basically a Bean which has two methods which only differ in once not
taking any parameters and the other one taking an int as a parameter.
Running this webapp with WebLogic Server 8.1.3 and JDK 1.4.2_05 works
fine.
Migrating to JDK 1.4.2_12 stops this bean from working with an JSP
Exception "No getter method for property level". (I double checked. The
identical War File works in _05 and ceases working in 1.4.2_12). I see
some related bugs in the Sun Bug DB but for different JDKs (Mainly
talking about some kind of "IndexedPropertyDescriptor").
Does someone have an idea what the cause of this issue is ?
Kind Regards,
Flurin Capaul
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
This message contains information that may be privileged or confidential and is
the property of the Capgemini Group. It is intended only for the person to whom
it is addressed. If you are not the intended recipient, you are not authorized
to read, print, retain, copy, disseminate, distribute, or use this message or
any part thereof. If you receive this message in error, please notify the
sender immediately and delete all copies of this message.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]