#8767 closed enhancement (fixed)
Inherit interfaces from all superclasses
| Reported by: | Remy Blank | Owned by: | Remy Blank |
|---|---|---|---|
| Priority: | low | Milestone: | 0.12 |
| Component: | general | Version: | none |
| Severity: | minor | Keywords: | |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description
When a component class is created, its interfaces are looked up in the class itself and in its direct superclasses. This means that a component class does not inherit the interfaces from its parent's parent, for example.
An example of this pathology can be found in the ticket admin panels. PriorityAdminPanel inherits from AbstractEnumAdminPanel which in turn inherits from TicketAdminPanel. The interfaces declared in TicketAdminPanel must be re-declared in AbstractEnumAdminPanel, otherwise they are not inherited by PriorityAdminPanel.
I believe this is an oversight, and interfaces should be inherited by all superclasses.
Attachments (1)
Change History (6)
comment:1 by , 16 years ago
by , 16 years ago
| Attachment: | 8767-interface-inheritance-r8684.patch added |
|---|
Inherit interfaces from all superclasses.
comment:2 by , 16 years ago
The patch above fixes the issue, and adds a test case for this situation.
Thoughts?
comment:3 by , 16 years ago
I tried to see if the current behavior could be useful somehow, but didn't see any real benefit, so I think it's OK to do that change.
comment:5 by , 16 years ago
[8694] ensures that a component isn't registered more than once as implementing an interface. This could happen in code relying on the old behavior.
It also removes an obsolete test that wasn't working anyway.



Small correction: the issue occurs if
GrandParentimplements an interface,Parentimplements another one, andChildimplements a third one. In that case,Childdoesn't implement the interface ofGrandParent.