RFR: 8347826: Introspector shows wrong method list after 8071693 [v4]

Sergey Bylokhov serb at openjdk.org
Tue Feb 11 03:38:17 UTC 2025


On Thu, 6 Feb 2025 14:13:50 GMT, Roman Marchenko <rmarchenko at openjdk.org> wrote:

>> Fixed `com.sun.beans.introspect.MethodInfo#MethodOrder` to make `Introspector.addMethod()` working properly when filtering methods out.
>> 
>> Also fixed the test, and added the approptiate test case.
>
> Roman Marchenko has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update test/jdk/java/beans/Introspector/DefaultMethodBeanPropertyTest.java
>   
>   Co-authored-by: Aleksandr Zvegintsev <77687766+azvegint at users.noreply.github.com>

For example, if you change the return type of getDefault1 to String, the correct method will be chosen, because the code for covariance types will discard the "Object version" and choose the "String version" of the method.

Similar logic should be added to discard default methods if the same non-default method exists.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/23443#issuecomment-2649733108


More information about the client-libs-dev mailing list