[MAGNOLIA-2788] InstallContext should provide the correct "current module" to ModuleVersionHandlers at instantiation time Created: 15/Jun/09 Updated: 23/Jan/13 Resolved: 15/Jun/09 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | core |
| Affects Version/s: | 4.1 |
| Fix Version/s: | 4.1.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Magnolia International | Assignee: | Magnolia International |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Template: |
|
||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||||||
| Description |
|
Considering the following code: public class MyModuleVersionHandler extends DefaultModuleVersionHandler { public MyModuleVersionHandler() { super(); final ModuleDefinition currentModule = ModuleManager.Factory.getInstance().getInstallContext().getCurrentModuleDefinition(); System.out.println(currentModule); } } With 4.1, this print the ModuleDefinition of the module preceding the one corresponding to this version handler instead of "MyModule". This was originally not intended to work at all, so we will possibly prevent this from working with 4.2 - see |