Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-4348

OpenmrsClassLoader chooses wrong ModuleClassLoader when one module name is a substring of another module name

    Details

    • Complexity:
      Undetermined

      Description

      When loading classes, the OpenmrsClassLoader iterates through all the ModuleClassLoaders looking for the appropriate class loader to use. To pick a class loader it compares the class name to the ModuleClassLoader package name as follows:

      boolean tryToLoad = name.startsWith(classLoader.getModule().getPackageName());

      The problem here is that trying to load org.openmrs.reportingui.SomeClass will match for the org.openmrs.reporting classloader. We need to append a "." to the matching to ensure this doesn't happen.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mogoodrich Mark Goodrich
                Reporter:
                mogoodrich Mark Goodrich
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: