Browse Source

rename vaild to valid (#1961)

pull/2/head
gabry.wu 5 years ago committed by GitHub
parent
commit
99ac739851
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ExecutorService.java
  2. 2
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/CheckUtils.java
  3. 2
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/JSONUtils.java
  4. 6
      dolphinscheduler-common/src/test/java/org/apache/dolphinscheduler/common/utils/JSONUtilsTest.java
  5. 2
      dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/TaskInstanceMapperTest.java

6
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ExecutorService.java

@ -117,7 +117,7 @@ public class ExecutorService extends BaseService{
} }
if (!checkTenantSuitable(processDefinition)){ if (!checkTenantSuitable(processDefinition)){
logger.error("there is not any vaild tenant for the process definition: id:{},name:{}, ", logger.error("there is not any valid tenant for the process definition: id:{},name:{}, ",
processDefinition.getId(), processDefinition.getName()); processDefinition.getId(), processDefinition.getName());
putMsg(result, Status.TENANT_NOT_SUITABLE); putMsg(result, Status.TENANT_NOT_SUITABLE);
return result; return result;
@ -206,7 +206,7 @@ public class ExecutorService extends BaseService{
return checkResult; return checkResult;
} }
if (!checkTenantSuitable(processDefinition)){ if (!checkTenantSuitable(processDefinition)){
logger.error("there is not any vaild tenant for the process definition: id:{},name:{}, ", logger.error("there is not any valid tenant for the process definition: id:{},name:{}, ",
processDefinition.getId(), processDefinition.getName()); processDefinition.getId(), processDefinition.getName());
putMsg(result, Status.TENANT_NOT_SUITABLE); putMsg(result, Status.TENANT_NOT_SUITABLE);
} }
@ -539,7 +539,7 @@ public class ExecutorService extends BaseService{
} }
} }
}else{ }else{
logger.error("there is not vaild schedule date for the process definition: id:{},date:{}", logger.error("there is not valid schedule date for the process definition: id:{},date:{}",
processDefineId, schedule); processDefineId, schedule);
} }
}else{ }else{

2
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/CheckUtils.java

@ -86,7 +86,7 @@ public class CheckUtils {
* @return true if other parameters are valid, otherwise return false * @return true if other parameters are valid, otherwise return false
*/ */
public static boolean checkOtherParams(String otherParams) { public static boolean checkOtherParams(String otherParams) {
return StringUtils.isNotEmpty(otherParams) && !JSONUtils.checkJsonVaild(otherParams); return StringUtils.isNotEmpty(otherParams) && !JSONUtils.checkJsonValid(otherParams);
} }
/** /**

2
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/JSONUtils.java

@ -126,7 +126,7 @@ public class JSONUtils {
* @param json json * @param json json
* @return true if valid * @return true if valid
*/ */
public static boolean checkJsonVaild(String json) { public static boolean checkJsonValid(String json) {
if (StringUtils.isEmpty(json)) { if (StringUtils.isEmpty(json)) {
return false; return false;

6
dolphinscheduler-common/src/test/java/org/apache/dolphinscheduler/common/utils/JSONUtilsTest.java

@ -117,9 +117,9 @@ public class JSONUtilsTest {
} }
@Test @Test
public void testCheckJsonVaild() { public void testCheckJsonValid() {
Assert.assertTrue(JSONUtils.checkJsonVaild("3")); Assert.assertTrue(JSONUtils.checkJsonValid("3"));
Assert.assertFalse(JSONUtils.checkJsonVaild("")); Assert.assertFalse(JSONUtils.checkJsonValid(""));
} }
@Test @Test

2
dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/TaskInstanceMapperTest.java

@ -121,7 +121,7 @@ public class TaskInstanceMapperTest {
} }
/** /**
* test find vaild task list by process instance id * test find valid task list by process instance id
*/ */
@Test @Test
public void testFindValidTaskListByProcessId() { public void testFindValidTaskListByProcessId() {

Loading…
Cancel
Save