Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-2788

InstallContext should provide the correct "current module" to ModuleVersionHandlers at instantiation time

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.1.1
    • 4.1
    • core
    • None

      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 MAGNOLIA-2787 !

        Acceptance criteria

              gjoseph Magnolia International
              gjoseph Magnolia International
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD