On Thu, 6 Feb 2025 14:13:50 GMT, Roman Marchenko <rmarche...@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+azveg...@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