Skip to content

Commit 95c1255

Browse files
committed
Updated JdkVersion regarding Java 9 support
- JdkVersion#JAVA_19 is now properly set to 6 instead of 5. - Javadoc for getMajorJavaVersion() now references currently supported Java versions.
1 parent b9ca0fb commit 95c1255

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

spring-core/src/main/java/org/springframework/core/JdkVersion.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,16 @@
1717
package org.springframework.core;
1818

1919
/**
20-
* Internal helper class used to find the Java/JVM version
21-
* that Spring is operating on, to allow for automatically
22-
* adapting to the present platform's capabilities.
20+
* Internal helper class used to find the Java/JVM version that Spring is
21+
* operating on, to allow for automatically adapting to the present platform's
22+
* capabilities.
2323
*
2424
* <p>Note that Spring requires JVM 1.6 or higher, as of Spring 4.0.
2525
*
2626
* @author Rod Johnson
2727
* @author Juergen Hoeller
2828
* @author Rick Evans
29+
* @author Sam Brannen
2930
*/
3031
public abstract class JdkVersion {
3132

@@ -62,7 +63,7 @@ public abstract class JdkVersion {
6263
/**
6364
* Constant identifying the 1.9 JVM (Java 9).
6465
*/
65-
public static final int JAVA_19 = 5;
66+
public static final int JAVA_19 = 6;
6667

6768

6869
private static final String javaVersion;
@@ -101,12 +102,11 @@ public static String getJavaVersion() {
101102
/**
102103
* Get the major version code. This means we can do things like
103104
* {@code if (getMajorJavaVersion() >= JAVA_17)}.
104-
* @return a code comparable to the JAVA_XX codes in this class
105-
* @see #JAVA_13
106-
* @see #JAVA_14
107-
* @see #JAVA_15
105+
* @return a code comparable to the {@code JAVA_XX} codes in this class
108106
* @see #JAVA_16
109-
* @see #JAVA_17
107+
* @see #JAVA_17
108+
* @see #JAVA_18
109+
* @see #JAVA_19
110110
*/
111111
public static int getMajorJavaVersion() {
112112
return majorJavaVersion;

0 commit comments

Comments
 (0)