DATACMNS-1376 - Polishing.

Moved JVM version lookup into Version.

Original pull request: #307.
This commit is contained in:
Oliver Gierke
2018-08-17 13:07:48 +02:00
parent 0d39693c94
commit f00d5b9ac6
2 changed files with 12 additions and 6 deletions

View File

@@ -87,6 +87,15 @@ public class Version implements Comparable<Version> {
return new Version(intParts);
}
/**
* Returns the Java version of the running JVM.
*
* @return will never be {@literal null}.
*/
public static Version javaVersion() {
return parse(System.getProperty("java.version"));
}
/**
* Returns whether the current {@link Version} is greater (newer) than the given one.
*