Skip to content

Commit

Permalink
Fixes for 2022-06
Browse files Browse the repository at this point in the history
  • Loading branch information
jmini committed Jun 16, 2022
1 parent 0431b74 commit 8fca8b5
Show file tree
Hide file tree
Showing 3 changed files with 13,564 additions and 0 deletions.
Expand Up @@ -99,6 +99,13 @@ static Map<String, String> parse(InputStream inputStream, Function<String, Strin
}

static String calculateMavenCentralVersion(String bundleId, String bundleVersion) {
if ("org.eclipse.equinox.preferences".equals(bundleId) && "3.10.0.v20220503-1634".equals(bundleVersion)) {
// See https://github.com/eclipse-equinox/equinox.bundles/issues/54
return "3.10.1";
} else if ("org.eclipse.osgi.util".equals(bundleId) && "3.7.0.v20220427-2144".equals(bundleVersion)) {
// See https://github.com/eclipse-equinox/equinox.framework/issues/70
return "3.7.1";
}
Version parsed = Version.parseVersion(bundleVersion);
if (ICU_BUNDLE_ID.equals(bundleId) && parsed.getMicro() == 0) {
return parsed.getMajor() + "." + parsed.getMinor();
Expand Down
Expand Up @@ -90,6 +90,28 @@ private void assert4140(Map<String, String> groupIdArtifactIdToVersion) {
.hasSize(785);
}

@Test
public void testParsing4240() throws IOException, ParserConfigurationException, SAXException {
try (InputStream input = MavenCentralMappingTest.class.getResourceAsStream("/artifacts-4.24.0.xml")) {
assert4240(MavenCentralMapping.parse(input, MavenCentralMapping::groupIdArtifactId));
}
}

private void assert4240(Map<String, String> groupIdArtifactIdToVersion) {
Assertions.assertThat(groupIdArtifactIdToVersion)
.containsEntry("org.eclipse.platform:org.eclipse.debug.core", "3.19.100")
.containsEntry("org.eclipse.platform:org.eclipse.equinox.p2.metadata", "2.6.200")
.containsEntry("org.eclipse.platform:org.eclipse.help", "3.9.100")
.containsEntry("org.eclipse.ecf:org.eclipse.ecf", "3.10.0")
.containsEntry("org.eclipse.jdt:org.eclipse.jdt.core", "3.30.0")
.containsEntry("org.eclipse.jdt:ecj", "3.30.0")
.containsEntry("org.osgi:org.osgi.service.prefs", "1.1.2")
.containsEntry("org.osgi:org.osgi.util.function", "1.2.0")
.containsEntry("org.eclipse.platform:org.eclipse.equinox.preferences","3.10.1") // 3.10.0 is broken on maven central, a fix was published
.containsEntry("org.eclipse.platform:org.eclipse.osgi.util", "3.7.1") // 3.7.0 is broken on maven central, a fix was published
.hasSize(833);
}

@Test
public void testMissingBugfixVersion() throws IOException {
Assertions.assertThatThrownBy(() -> {
Expand Down

0 comments on commit 8fca8b5

Please sign in to comment.