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.
master
Sam Brannen 12 years ago
parent b9ca0fb947
commit 95c1255452
  1. 18
      spring-core/src/main/java/org/springframework/core/JdkVersion.java

@ -17,15 +17,16 @@
package org.springframework.core;
/**
* Internal helper class used to find the Java/JVM version
* that Spring is operating on, to allow for automatically
* adapting to the present platform's capabilities.
* Internal helper class used to find the Java/JVM version that Spring is
* operating on, to allow for automatically adapting to the present platform's
* capabilities.
*
* <p>Note that Spring requires JVM 1.6 or higher, as of Spring 4.0.
*
* @author Rod Johnson
* @author Juergen Hoeller
* @author Rick Evans
* @author Sam Brannen
*/
public abstract class JdkVersion {
@ -62,7 +63,7 @@ public abstract class JdkVersion {
/**
* Constant identifying the 1.9 JVM (Java 9).
*/
public static final int JAVA_19 = 5;
public static final int JAVA_19 = 6;
private static final String javaVersion;
@ -101,12 +102,11 @@ public abstract class JdkVersion {
/**
* Get the major version code. This means we can do things like
* {@code if (getMajorJavaVersion() >= JAVA_17)}.
* @return a code comparable to the JAVA_XX codes in this class
* @see #JAVA_13
* @see #JAVA_14
* @see #JAVA_15
* @return a code comparable to the {@code JAVA_XX} codes in this class
* @see #JAVA_16
* @see #JAVA_17
* @see #JAVA_17
* @see #JAVA_18
* @see #JAVA_19
*/
public static int getMajorJavaVersion() {
return majorJavaVersion;

Loading…
Cancel
Save