RFR: 8071693: Introspector ignores default interface methods [v6]
Sergey Bylokhov
serb at openjdk.org
Mon Apr 24 18:17:54 UTC 2023
On Mon, 24 Apr 2023 17:48:37 GMT, Archie Cobbs <acobbs at openjdk.org> wrote:
>> The `Introspector` class was never updated to include `default` methods inherited from interfaces.
>>
>> This patch attempts to fix that omission.
>
> Archie Cobbs has updated the pull request incrementally with one additional commit since the last revision:
>
> Add braces around if clause.
test/jdk/java/beans/Introspector/DefaultMethodBeanPropertyTest.java line 34:
> 32: import java.util.HashSet;
> 33:
> 34: public class DefaultMethodBeanPropertyTest {
Can we please add two additional tests to verify the "diamond" case:
- getFoo is in the top interfaceA, two empty subinterfaces B anc C , and one class D of B and C, will the D have one correct prop Foo?
- getFoo is in the top interfaceA, two non-empty subinterfaces B and C and each override getFoo by the different return types, and then one class D of B and C which override getFoo again by compatible type from B and C, will the D have one correct prop Foo?
We also can test the case if the D from the cases above is interface and implemented by the class E.
test/jdk/java/beans/Introspector/DefaultMethodBeanPropertyTest.java line 78:
> 76:
> 77: // Expected properties
> 78: final HashSet<PropertyDescriptor> expected = new HashSet<>();
please split the long lines to use 80 chars per line.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13544#discussion_r1175633760
PR Review Comment: https://git.openjdk.org/jdk/pull/13544#discussion_r1175634936
More information about the client-libs-dev
mailing list