<Beans Dev>  Review Request: 8156043 Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
Sergey.Bylokhov at oracle.com
Tue May 24 18:37:39 UTC 2016
On 24.05.16 20:31, Semyon Sadetsky wrote:
> Could you check which property setter/getter will be returned if to add
> an extra method:
> public Enum getFoo()
> is added to the 1. the test Sub class, 2. the test Base class?
In this case the type of foo property will be Enum, before and after the
fix. But the write method will be found only if this method is added to
Sub, in other case the write method is recognized only if we remove all
duplicates of set(xxx). Not sure is it intended behavior in jdk9 to skip
such writers or not. I will file CR for that.
> On 5/17/2016 3:20 PM, Sergey Bylokhov wrote:
>> Please review the fix for jdk9.
>> We have a number of bugs which state that our JavaBeans randomly does
>> not work, examples: JDK-6807471 , JDK-6788525, the reason is
>> that the order of methods from Class.getMethods() is not specified.
>> So I propose to fix this bug totally and sort the methods in some
>> order. Note that the resulted list is cached, and we sort the list
>> only the once.
>> The code partly was copied from com.sun.jmx.mbeanserver.MethodOrder
>> , but the parameters check and the order for return values were
>> changed. After this fix our bugs(if any) can be easily reproduced.
>>  https://bugs.openjdk.java.net/browse/JDK-6807471
>>  https://bugs.openjdk.java.net/browse/JDK-6788525
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8156043
>> Webrev can be found at:
Best regards, Sergey.
More information about the beans-dev