Online Books:
java.net on MarkMail:
Search |
||
Bizarre behaviour in PropertyDescriptorPosted by mister__m on November 29, 2004 at 9:26 AM PST
I've just found out the most bizarre bug I've ever come accross in my 5 years of experience with the Java platform. Let's suppose you have the following code:
Basically there are two JavaBean classes, B1 and B2. B2 extends B1 and override the getter method for property. BizarreBean.main(String[]) just retrieves an array of PropertyDescriptors from B2's BeanInfo instance and then print the read method for property. The output for this will be:
But what happens if a setter is defined for property? If B1 and B2 are changed like this:
Then the output becomes:
What is the logic behind this? None. This is one of the most awkward bugs I've ever found in J2SE. Unless anyone is able to explain in a reasonable way why this is not bug (I seriously doubt anyone will be able to), I'll file a bug report in the bug parade.»
Related Topics >>
J2SE Comments
Comments are listed in date ascending order (oldest first)
|
||
|
|