修复配置导入错误IsHex值不校验BUG

复现条件:填写错误IsHex值,不填写Is Case-sensitive
This commit is contained in:
zhangwenqing
2019-03-22 18:21:25 +08:00
parent fc302fe984
commit 253adc1396
3 changed files with 115 additions and 112 deletions

View File

@@ -381,7 +381,10 @@ public class CheckComplexStringFormatThread implements Callable<String>{
prop.getProperty("is_case_insenstive")) + ";"); prop.getProperty("is_case_insenstive")) + ";");
} }
} }
} else { }
isHex = baseStringCfg.getIsHex();
isCaseInsenstive = baseStringCfg.getIsCaseInsenstive();
if (isHex.intValue() != 0 && isHex.intValue() != 1) { if (isHex.intValue() != 0 && isHex.intValue() != 1) {
errInfo.append( errInfo.append(
String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_hex")) + ";"); String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_hex")) + ";");
@@ -417,9 +420,7 @@ public class CheckComplexStringFormatThread implements Callable<String>{
prop.getProperty("key_word") + " '" + keyword + "' "+String.format(prop.getProperty("contains_non_hex_char")) + ";"); prop.getProperty("key_word") + " '" + keyword + "' "+String.format(prop.getProperty("contains_non_hex_char")) + ";");
} }
} }
}
isHex = baseStringCfg.getIsHex();
isCaseInsenstive = baseStringCfg.getIsCaseInsenstive();
if (isHex != null && isCaseInsenstive != null) { if (isHex != null && isCaseInsenstive != null) {
if (isHex.intValue() == 0 && isCaseInsenstive.intValue() == 0) { if (isHex.intValue() == 0 && isCaseInsenstive.intValue() == 0) {
baseStringCfg.setIsHexbin(0); baseStringCfg.setIsHexbin(0);

View File

@@ -437,7 +437,10 @@ public class CheckStringFormatThread implements Callable<String>{
prop.getProperty("is_case_insenstive")) + ";"); prop.getProperty("is_case_insenstive")) + ";");
} }
} }
} else { }
isHex = baseStringCfg.getIsHex();
isCaseInsenstive = baseStringCfg.getIsCaseInsenstive();
if (isHex.intValue() != 0 && isHex.intValue() != 1) { if (isHex.intValue() != 0 && isHex.intValue() != 1) {
errInfo.append( errInfo.append(
String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_hex")) + ";"); String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_hex")) + ";");
@@ -477,9 +480,7 @@ public class CheckStringFormatThread implements Callable<String>{
message + " '" + keyword + "' "+String.format(prop.getProperty("contains_non_hex_char")) + ";"); message + " '" + keyword + "' "+String.format(prop.getProperty("contains_non_hex_char")) + ";");
} }
} }
}
isHex = baseStringCfg.getIsHex();
isCaseInsenstive = baseStringCfg.getIsCaseInsenstive();
if (isHex != null && isCaseInsenstive != null) { if (isHex != null && isCaseInsenstive != null) {
if (isHex.intValue() == 0 && isCaseInsenstive.intValue() == 0) { if (isHex.intValue() == 0 && isCaseInsenstive.intValue() == 0) {
baseStringCfg.setIsHexbin(0); baseStringCfg.setIsHexbin(0);

View File

@@ -254,7 +254,10 @@ public class CheckTopicWebsiteFormatThread implements Callable<String>{
prop.getProperty("is_case_insenstive")) + ";"); prop.getProperty("is_case_insenstive")) + ";");
} }
} }
} else { }
isHex = baseStringCfg.getIsHex();
isCaseInsenstive = baseStringCfg.getIsCaseInsenstive();
if (isHex.intValue() != 0 && isHex.intValue() != 1) { if (isHex.intValue() != 0 && isHex.intValue() != 1) {
errInfo.append( errInfo.append(
String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_hex")) + ";"); String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_hex")) + ";");
@@ -290,9 +293,7 @@ public class CheckTopicWebsiteFormatThread implements Callable<String>{
prop.getProperty("domain_name") + " '" + keyword + "' "+String.format(prop.getProperty("contains_non_hex_char")) + ";"); prop.getProperty("domain_name") + " '" + keyword + "' "+String.format(prop.getProperty("contains_non_hex_char")) + ";");
} }
} }
}
isHex = baseStringCfg.getIsHex();
isCaseInsenstive = baseStringCfg.getIsCaseInsenstive();
if (isHex != null && isCaseInsenstive != null) { if (isHex != null && isCaseInsenstive != null) {
if (isHex.intValue() == 0 && isCaseInsenstive.intValue() == 0) { if (isHex.intValue() == 0 && isCaseInsenstive.intValue() == 0) {
baseStringCfg.setIsHexbin(0); baseStringCfg.setIsHexbin(0);