Skip to content

Commit 9ac1c76

Browse files
committed
Remove obsolete references to JRE.UNDEFINED
1 parent 71c3d64 commit 9ac1c76

File tree

1 file changed

+5
-9
lines changed
  • junit-jupiter-api/src/templates/resources/main/org/junit/jupiter/api/condition

1 file changed

+5
-9
lines changed

junit-jupiter-api/src/templates/resources/main/org/junit/jupiter/api/condition/JRE.java.jte

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ import org.apiguardian.api.API;
1919
*
2020
* <p>If the current JRE version can be detected but is not one of the predefined
2121
* constants in this enum, {@link #OTHER} will be considered to be the
22-
* {@linkplain #isCurrentVersion current JRE version}. If the current JRE version
23-
* cannot be detected &mdash; for example, if the {@code java.version} JVM system
24-
* property is undefined &mdash; {@link #UNDEFINED} will be considered to be the
25-
* current JRE version.
22+
* {@linkplain #isCurrentVersion current JRE version}.
2623
*
2724
* @since 5.1
2825
@for(JRE jre : jres)<%--
@@ -118,7 +115,7 @@ public enum JRE {
118115
/**
119116
* @return {@code true} if <em>this</em> {@code JRE} is known to be the
120117
* Java Runtime Environment version for the currently executing JVM or if
121-
* the version is {@link #OTHER} or {@link #UNDEFINED}
118+
* the version is {@link #OTHER}
122119
*
123120
* @see #currentJre()
124121
* @see #currentVersionNumber()
@@ -129,7 +126,7 @@ public enum JRE {
129126

130127
/**
131128
* @return the {@link JRE} for the currently executing JVM, potentially
132-
* {@link #OTHER} or {@link #UNDEFINED}
129+
* {@link #OTHER}
133130
*
134131
* @since 5.7
135132
* @see #currentVersionNumber()
@@ -143,15 +140,14 @@ public enum JRE {
143140

144141
/**
145142
* @return the {@link JRE} for the currently executing JVM, potentially
146-
* {@link #OTHER} or {@link #UNDEFINED}
143+
* {@link #OTHER}
147144
*
148145
* @since 5.12
149146
* @see #currentVersionNumber()
150147
*/
151148
@API(status = STABLE, since = "5.12")
152149
public static JRE currentJre() {
153-
return switch (CURRENT_VERSION) {
154-
case UNDEFINED_VERSION -> UNDEFINED;<%--
150+
return switch (CURRENT_VERSION) {<%--
155151
--%>@for(var jre : jres)
156152
case ${jre.getVersion()} -> JAVA_${jre.getVersion()};<%--
157153
--%>@endfor

0 commit comments

Comments
 (0)