[Improvement] Replace commons-lang 2 function invocations with commons-lang3 (#11810)

* [Improvement] Replace commons-lang 2 function invocations with commons-lang3
This commit is contained in:
Kengo Seki 2022-09-07 14:48:09 +09:00 committed by GitHub
parent 28469fc9b2
commit 444c7e6eb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 13 additions and 13 deletions

View File

@ -35,7 +35,7 @@ import org.apache.dolphinscheduler.dao.mapper.K8sNamespaceMapper;
import org.apache.dolphinscheduler.remote.exceptions.RemotingException;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import java.util.ArrayList;
import java.util.Date;

View File

@ -31,7 +31,7 @@ import org.apache.dolphinscheduler.dao.mapper.K8sNamespaceMapper;
import org.apache.dolphinscheduler.remote.exceptions.RemotingException;
import org.apache.dolphinscheduler.api.k8s.K8sClientService;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import java.util.ArrayList;
import java.util.Date;

View File

@ -396,7 +396,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
if (CollectionUtils.isNotEmpty(codes)) {
logger.error("the task code is not exist");
putMsg(result, Status.TASK_DEFINE_NOT_EXIST,
org.apache.commons.lang.StringUtils.join(codes, Constants.COMMA));
StringUtils.join(codes, Constants.COMMA));
return result;
}
}
@ -963,7 +963,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
@Override
public void batchExportProcessDefinitionByCodes(User loginUser, long projectCode, String codes,
HttpServletResponse response) {
if (org.apache.commons.lang.StringUtils.isEmpty(codes)) {
if (StringUtils.isEmpty(codes)) {
return;
}
Project project = projectMapper.queryByCode(projectCode);
@ -1891,7 +1891,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
return result;
}
if (org.apache.commons.lang.StringUtils.isEmpty(processDefinitionCodes)) {
if (StringUtils.isEmpty(processDefinitionCodes)) {
putMsg(result, Status.PROCESS_DEFINITION_CODES_IS_EMPTY, processDefinitionCodes);
return result;
}

View File

@ -226,7 +226,7 @@ public class ProcessTaskRelationServiceImpl extends BaseServiceImpl implements P
}
}
if (CollectionUtils.isNotEmpty(downstreamList)) {
putMsg(result, Status.TASK_HAS_DOWNSTREAM, org.apache.commons.lang.StringUtils.join(downstreamList, ","));
putMsg(result, Status.TASK_HAS_DOWNSTREAM, StringUtils.join(downstreamList, ","));
return result;
}
updateProcessDefiniteVersion(loginUser, result, processDefinition);

View File

@ -19,7 +19,7 @@ package org.apache.dolphinscheduler.common.utils;
import org.apache.dolphinscheduler.common.shell.ShellExecutor;
import org.apache.commons.lang.SystemUtils;
import org.apache.commons.lang3.SystemUtils;
import org.apache.commons.lang3.StringUtils;
import java.io.BufferedReader;

View File

@ -17,7 +17,7 @@
package org.apache.dolphinscheduler.common;
import org.apache.commons.lang.SystemUtils;
import org.apache.commons.lang3.SystemUtils;
import org.junit.Assert;
import org.junit.Test;

View File

@ -17,7 +17,7 @@
package org.apache.dolphinscheduler.common.os;
import org.apache.commons.lang.SystemUtils;
import org.apache.commons.lang3.SystemUtils;
import org.apache.dolphinscheduler.common.utils.OSUtils;
import org.junit.Assert;

View File

@ -101,7 +101,7 @@ public class CommonUtils {
public static String getDataQualityJarName() {
String dqsJarName = PropertyUtils.getString(DATA_QUALITY_JAR_NAME);
if (org.apache.commons.lang.StringUtils.isEmpty(dqsJarName)) {
if (StringUtils.isEmpty(dqsJarName)) {
return "dolphinscheduler-data-quality.jar";
}

View File

@ -18,7 +18,7 @@
package org.apache.dolphinscheduler.server.master.registry;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.enums.NodeType;
import org.apache.dolphinscheduler.common.model.Server;

View File

@ -18,7 +18,7 @@
package org.apache.dolphinscheduler.plugin.task.chunjun;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.SystemUtils;
import org.apache.commons.lang3.SystemUtils;
import org.apache.dolphinscheduler.plugin.task.api.AbstractTaskExecutor;
import org.apache.dolphinscheduler.plugin.task.api.ShellCommandExecutor;
import org.apache.dolphinscheduler.plugin.task.api.TaskConstants;

View File

@ -19,7 +19,7 @@ package org.apache.dolphinscheduler.server.worker.utils;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang.SystemUtils;
import org.apache.commons.lang3.SystemUtils;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.dolphinscheduler.common.exception.StorageOperateNoConfiguredException;
import org.apache.dolphinscheduler.common.storage.StorageOperate;