Use replaceAll() return value

The replaceAll() method returns the result. It does not modify the current string.
This commit is contained in:
Thomas Leplus 2021-09-16 23:28:32 -07:00 committed by fit2-zhao
parent 99134544ca
commit 062db32e77
1 changed files with 1 additions and 1 deletions

View File

@ -465,7 +465,7 @@ public class MsHTTPSamplerProxy extends MsTestElement {
url = "http://" + url;
}
if (StringUtils.isNotEmpty(this.getPort()) && this.getPort().startsWith("${")) {
url.replaceAll(this.getPort(), "10990");
url = url.replaceAll(this.getPort(), "10990");
}
if (url == null) {
MSException.throwException("请重新选择环境");