GangLiCN commented on code in PR #6435:
URL: https://github.com/apache/seatunnel/pull/6435#discussion_r1513998376
##########
seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/utils/SystemUtil.java:
##########
@@ -0,0 +1,24 @@
+package org.apache.seatunnel.core.starter.utils;
+
+import org.apache.commons.lang3.SystemUtils;
+
+public class SystemUtil {
+
+ public static String GetOsType() {
+ String os_type="";
+
+ if (SystemUtils.IS_OS_WINDOWS) {
+ os_type="Windows";
+ } else if (SystemUtils.IS_OS_MAC) {
+ os_type="Mac";
+ } else if (SystemUtils.IS_OS_LINUX) {
Review Comment:
I don't think "switch... case" is needed here, because there are many
different properties from SystemUtils(e.g. IS_OS_LINUX, IS_OS_WINDOWS,,,etc),
if SystemUtils can return unique property "OS_TYPE" then we can change to
Switch... case style easily.
--
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]