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

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Tue May 17 12:20:13 UTC 2016


Hello.
Please review the fix for jdk9.

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.
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 [3], 
but the parameters check and the order for return values were changed. 
After this fix our bugs(if any) can be easily reproduced.

[1] https://bugs.openjdk.java.net/browse/JDK-6807471
[2] https://bugs.openjdk.java.net/browse/JDK-6788525
[3] 
http://hg.openjdk.java.net/jdk9/client/jdk/file/fb38b0925915/src/java.management/share/classes/com/sun/jmx/mbeanserver/MBeanAnalyzer.java

Bug: https://bugs.openjdk.java.net/browse/JDK-8156043
Webrev can be found at: http://cr.openjdk.java.net/~serb/8156043/webrev.00

-- 
Best regards, Sergey.


More information about the beans-dev mailing list