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

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

    XMLWordPrintable

Details

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

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

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD