Skip to content

Commit 260640d

Browse files
committed
Sort JUnit bundles by name to ensure a consistent ordering
Currently Junit bundles and their closure is just returned in a quite random order. This leads to sometimes triggering a rebuild because classpath seems to have changed. This now sort them by their bundle id to ensure to have always the same order.
1 parent bed58e3 commit 260640d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/RequiredPluginsClasspathContainer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,8 @@ private static List<BundleDescription> collectJunit5RuntimeRequirements() {
629629
Set<BundleDescription> closure = DependencyManager.findRequirementsClosure(roots,
630630
INCLUDE_OPTIONAL_DEPENDENCIES);
631631
String systemBundleBSN = TargetPlatformHelper.getPDEState().getSystemBundle();
632-
return closure.stream().filter(b -> !b.getSymbolicName().equals(systemBundleBSN)).toList();
632+
return closure.stream().filter(b -> !b.getSymbolicName().equals(systemBundleBSN))
633+
.sorted(Comparator.comparing(BundleDescription::getSymbolicName)).toList();
633634
}
634635

635636
private void addSecondaryDependencies(BundleDescription desc, Set<BundleDescription> added,

0 commit comments

Comments
 (0)