lifeSo commented on code in PR #1389:
URL:
https://github.com/apache/incubator-uniffle/pull/1389#discussion_r1432499653
##########
common/src/main/java/org/apache/uniffle/common/util/JavaUtils.java:
##########
@@ -22,13 +22,26 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Function;
+import com.google.common.base.Enums;
import org.apache.commons.lang3.JavaVersion;
import org.apache.commons.lang3.SystemUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class JavaUtils {
private static final Logger logger =
LoggerFactory.getLogger(JavaUtils.class);
+ private static final String JAVA_9 = "JAVA_9";
+
+ public static boolean isJavaVersionAtLeastJava9() {
+ if (Enums.getIfPresent(JavaVersion.class, JAVA_9).isPresent()
Review Comment:
`Enums.getIfPresent(JavaVersion.class, JAVA_9).isPresent()
`
is check is "JAVA_9" in enum JavaVersion.
`SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_9)
`
is check is system support jdk9
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]