Commit a0b74bc
Restore supplier-disposal link in ClassRequestor without jakarta
The E4 Injector was decoupled from jakarta annotations by replacing
the ClassRequestor pseudo-dependency descriptor with an empty array, in:
- #2649
That pseudo-link is what notifies an injected object when its supplier
is disposed. With an empty descriptor the link is no longer established,
so @PreDestroy of objects that only use constructor/@PostConstruct
injection (no @Inject links) is no longer guaranteed to run before the
supplying context is disposed.
This broke disposal ordering and surfaced as a failure of
PartRenderingEngineTests.testBut336225.
Restore a non-empty, optional descriptor without re-introducing jakarta:
use a private marker interface InjectionLink that is never available
from any supplier together with e4's own @optional annotation. This
keeps the injector free of specific jakarta annotation classes (the goal
of the previous change) while re-establishing the supplier-disposal
link.
Fixes #27001 parent ffdebb7 commit a0b74bc
1 file changed
Lines changed: 19 additions & 1 deletion
File tree
- runtime/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/internal/di
Lines changed: 19 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
29 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
30 | 48 | | |
31 | 49 | | |
32 | 50 | | |
| |||
0 commit comments