@@ -19,10 +19,7 @@ import org.apiguardian.api.API;
19
19
*
20
20
* <p >If the current JRE version can be detected but is not one of the predefined
21
21
* 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 — for example, if the {@code java.version} JVM system
24
- * property is undefined — {@link #UNDEFINED} will be considered to be the
25
- * current JRE version.
22
+ * {@linkplain #isCurrentVersion current JRE version}.
26
23
*
27
24
* @since 5.1
28
25
@for(JRE jre : jres)< % --
@@ -118,7 +115,7 @@ public enum JRE {
118
115
/**
119
116
* @return {@code true} if <em >this</em > {@code JRE} is known to be the
120
117
* 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}
122
119
*
123
120
* @see #currentJre()
124
121
* @see #currentVersionNumber()
@@ -129,7 +126,7 @@ public enum JRE {
129
126
130
127
/**
131
128
* @return the {@link JRE} for the currently executing JVM, potentially
132
- * {@link #OTHER} or {@link #UNDEFINED}
129
+ * {@link #OTHER}
133
130
*
134
131
* @since 5.7
135
132
* @see #currentVersionNumber()
@@ -143,15 +140,14 @@ public enum JRE {
143
140
144
141
/**
145
142
* @return the {@link JRE} for the currently executing JVM, potentially
146
- * {@link #OTHER} or {@link #UNDEFINED}
143
+ * {@link #OTHER}
147
144
*
148
145
* @since 5.12
149
146
* @see #currentVersionNumber()
150
147
*/
151
148
@API(status = STABLE, since = "5.12")
152
149
public static JRE currentJre() {
153
- return switch (CURRENT_VERSION) {
154
- case UNDEFINED_VERSION -> UNDEFINED;<%--
150
+ return switch (CURRENT_VERSION) {<%--
155
151
--%> @for(var jre : jres)
156
152
case ${jre. getVersion() } -> JAVA_${jre. getVersion() };<%--
157
153
--%> @endfor
0 commit comments