[ISSUE-#4306] StringJoiner should consider '@@'. (#5022)
* StringJoiner should consider '@@'. * StringJoiner should consider '@@'.
This commit is contained in:
parent
63f7e337d9
commit
b1c39a6354
@ -176,6 +176,8 @@ public class Constants {
|
||||
|
||||
public static final String SERVICE_INFO_SPLITER = "@@";
|
||||
|
||||
public static final int SERVICE_INFO_SPLIT_COUNT = 2;
|
||||
|
||||
public static final String NULL_STRING = "null";
|
||||
|
||||
public static final String NUMBER_PATTERN = "^\\d+$";
|
||||
|
@ -941,7 +941,7 @@ public class ServiceManager implements RecordListener<Service> {
|
||||
|
||||
if (StringUtils.isNotBlank(param)) {
|
||||
StringJoiner regex = new StringJoiner(Constants.SERVICE_INFO_SPLITER);
|
||||
for (String s : param.split(Constants.SERVICE_INFO_SPLITER)) {
|
||||
for (String s : param.split(Constants.SERVICE_INFO_SPLITER, Constants.SERVICE_INFO_SPLIT_COUNT)) {
|
||||
regex.add(StringUtils.isBlank(s) ? Constants.ANY_PATTERN
|
||||
: Constants.ANY_PATTERN + s + Constants.ANY_PATTERN);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user