YutSean commented on a change in pull request #3784:
URL: https://github.com/apache/hbase/pull/3784#discussion_r737296535



##########
File path: hbase-common/src/main/java/org/apache/hadoop/hbase/util/JVM.java
##########
@@ -60,6 +60,21 @@
 
   private static final String JVMVersion = System.getProperty("java.version");
 
+  /**
+   * The raw String of java specification version.
+   * "1.8" for java8, "9","10"... for Java 9, 10...
+   */
+  private static final String JVM_SPEC_VERSION_STRING =
+    System.getProperty("java.specification.version");
+
+  /**
+   * The Integer represent of JVM_SPEC_VERSION, for the JVM version comparison.
+   * NOTE: Java 8 will be represented by 1.
+   */
+  private static final int JVM_SPEC_VERSION = 
JVM_SPEC_VERSION_STRING.contains(".") ?
+    (int) Float.parseFloat(System.getProperty("java.specification.version")) :

Review comment:
       Refined the version number logic, it now return a int like 8, 9, 10,....




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to