Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-2210

Additional class path ordering broken since 3.2.0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 3.2.1, 3.2.2
    • 3.2.3
    • None
    • None

    Description

      Since commit 47eb1974ef2fb77c621e5cb0c47ac10ab8f4753d (#667, SUREFIRE-2179), the ordering of the additionalClasspathElements list configuration property is no longer preserved. This breaks testing of multi-release JARs, where the directories for newer JDKs must be strictly ordered before the directories for older JDKs.

      The problem is likely due to changing the additional class paths collection from a `List` to a `Set`, which does not preserve ordering.

      One simple fix could be to change the line Set<String> additionalClasspathElements = new HashSet<>(); to construct a LinkedHashSet instead.

      /cc kwin who wrote the original patch back in June.

      Attachments

        Issue Links

          Activity

            People

              kwin Konrad Windszus
              dmlloyd David M. Lloyd
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: