<Beans Dev> [9] Review Request: 8156043 Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters

Semyon Sadetsky semyon.sadetsky at oracle.com
Fri May 27 15:06:09 UTC 2016

On 5/27/2016 4:19 PM, Sergey Bylokhov wrote:
> On 27.05.16 15:37, Semyon Sadetsky wrote:
>>> It is obviously that the added code discards nothing, it is a wrapper
>>> on top of the Class.getMethods(), which make the order of methods 
>>> stable.
>> Right. But only the first overloaded method in this order will survive.
>> So one way or another this order determines which property to discard.
> Now you can reread the first sentence in the review request:
> "We have a number of bugs which state that our JavaBeans randomly does 
> not work, examples: JDK-6807471[1] , JDK-6788525[2], the reason is 
> that the order of methods from Class.getMethods() is not specified"
> Summarize what I said a few times:
>  - We have a number of bugs which we cannot reproduce and after the 
> fix it will be an easy task.
>  - The fix does not change the logic of selection or discarding the 
> properties. All cases was possible before the fix with some probability.
>  - The goal of the fix is to remove randomness of our behavior.
>  - A separate bug was filed to investigate the reason of some 
> behavior. Those bug will be fixed(if will) via separate fix in another 
> part of the code, where we actually take care about hierarchy of 
> classes and types.
Sergey, what do you think, may this misunderstanding be caused by the 
bug title:  "Unstable behavior of PropertyDescriptor's getWriteMethod() 
in case of overloaded setters" ? And, of cause, by the test mentioned in 
the bug summary, and the test proposed in your fix, which examines the 
Introspector. getPropertyDescriptors(), not the Class.getMethods()?

More information about the beans-dev mailing list