I have this specific requirement due to the fact that a third-party library somehow has this interface A
which extends B
, which in turn extends C, D
.
Now, the problem is that interface C extends D
. IMO, since C
already extends D
, B
should only extends C
.
The issue arises when I try to use object of type interface A
to bind a form in Vaadin Flow. The error message is: Duplicate key found for property [this common method]
.
I inspected the object and noticed there is the following hierarchy:
// myObject:
// reflectionData:
// referent:
// interfaces:
// [0]:
// name: "com.example...." [interface B from above]
// reflectionData:
// referent:
// interfaces:
// [0]:
// name: "com.example..." [interface C from above]
// [1]:
// name: "com.example..." [interface D from above]
My idea was to somehow, by using Java reflection maybe, remove the second element of the array (interface D
) (if it's possible, that is), before sending the object to Vaadin's Binder
class.