Add boot-versions module: Spring Boot versions and support dates read from primary sources, Java baselines proven on JDK 8 to 27, 4.0 to 4.2 checks, with real transcripts

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b7N4ZDbUtA3ofqAqRV
This commit is contained in:
Claude
2026-12-03 09:26:27 +05:30
parent 24dc4ba3ff
commit 2a8219a6ee
28 changed files with 1704 additions and 0 deletions
@@ -0,0 +1,51 @@
package com.ankurm.bootversions;
import static org.junit.jupiter.api.Assertions.assertEquals;
import java.io.IOException;
import java.time.LocalDate;
import java.util.List;
import org.junit.jupiter.api.Test;
/** Pins the support-date table of the article to a saved copy of api.spring.io (2026-12-03). */
class SupportTest {
private static final LocalDate DAY = LocalDate.parse("2026-12-03");
private static Support line(String name) throws IOException {
try (var in = SupportTest.class.getResourceAsStream("/generations-2026-12-03.json")) {
return Support.parse(new String(in.readAllBytes())).stream()
.filter(s -> s.line().equals(name)).findFirst().orElseThrow();
}
}
@Test
void boot40LosesFreeSupportOn31December2026() throws IOException {
Support s = line("4.0.x");
assertEquals(LocalDate.parse("2026-12-31"), s.ossEnd());
assertEquals(LocalDate.parse("2027-12-31"), s.commercialEnd());
assertEquals(28, s.ossDaysLeft(DAY));
assertEquals(Support.Status.OSS, s.statusOn(LocalDate.parse("2026-12-31")));
assertEquals(Support.Status.COMMERCIAL_ONLY, s.statusOn(LocalDate.parse("2027-01-01")));
}
@Test
void newerLines() throws IOException {
assertEquals(LocalDate.parse("2027-07-31"), line("4.1.x").ossEnd());
assertEquals(LocalDate.parse("2027-12-31"), line("4.2.x").ossEnd());
assertEquals(LocalDate.parse("2028-12-31"), line("4.2.x").commercialEnd());
}
@Test
void oldLines() throws IOException {
assertEquals(Support.Status.COMMERCIAL_ONLY, line("3.5.x").statusOn(DAY));
assertEquals(LocalDate.parse("2032-06-30"), line("3.5.x").commercialEnd());
assertEquals(Support.Status.ENDED, line("3.3.x").statusOn(DAY));
}
@Test
void milestonesAreNotReleases() {
assertEquals(List.of("4.1.3", "4.2.0"),
Central.gaOnly(List.of("4.2.0", "4.3.0-M1", "4.1.3", "4.2.0-RC2", "4.2.1-SNAPSHOT")));
}
}