Skip to content

Commit

Permalink
Allow Java 11 as LTS for older streams and other platforms
Browse files Browse the repository at this point in the history
(cherry picked from commit dcc6ff6)
  • Loading branch information
ia3andy authored and gsmet committed Feb 13, 2024
1 parent efca3e9 commit b8dd52a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public String toString() {
}

// ordering is important here, so let's keep them ordered
public static final SortedSet<Integer> JAVA_VERSIONS_LTS = new TreeSet<>(List.of(17, 21));
public static final SortedSet<Integer> JAVA_VERSIONS_LTS = new TreeSet<>(List.of(11, 17, 21));
public static final int DEFAULT_JAVA_VERSION = 17;
// we want to maximize the compatibility of extensions with the Quarkus ecosystem so let's stick to 17 by default
public static final String DEFAULT_JAVA_VERSION_FOR_EXTENSION = "17";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ public void givenJavaVersion21ShouldReturn21() {

@Test
void shouldProperlyUseMinJavaVersion() {
assertThat(getCompatibleLTSVersions(new JavaVersion("17"))).isEqualTo(JAVA_VERSIONS_LTS);
assertThat(getCompatibleLTSVersions(new JavaVersion("11"))).isEqualTo(JAVA_VERSIONS_LTS);
assertThat(getCompatibleLTSVersions(new JavaVersion("17"))).containsExactly(17, 21);
assertThat(getCompatibleLTSVersions(new JavaVersion("21"))).containsExactly(21);
assertThat(getCompatibleLTSVersions(new JavaVersion("100"))).isEmpty();
assertThat(getCompatibleLTSVersions(JavaVersion.NA)).isEqualTo(JAVA_VERSIONS_LTS);
Expand All @@ -46,7 +47,7 @@ public void givenAutoDetectShouldReturnAppropriateVersion() {
@Test
public void testDetermineBestLtsVersion() {
assertEquals(17, determineBestJavaLtsVersion(8));
assertEquals(17, determineBestJavaLtsVersion(11));
assertEquals(11, determineBestJavaLtsVersion(11));
assertEquals(17, determineBestJavaLtsVersion(17));
assertEquals(17, determineBestJavaLtsVersion(18));
assertEquals(21, determineBestJavaLtsVersion(21));
Expand Down

0 comments on commit b8dd52a

Please sign in to comment.