replace regex match with simple string comparisons

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
Ludovic Orban 2020-05-13 14:10:52 +02:00
parent 6527b3b083
commit 87be7b15eb
1 changed files with 1 additions and 1 deletions

View File

@ -1145,7 +1145,7 @@ public class HttpClient extends ContainerLifeCycle
protected String normalizeHost(String host)
{
if (host != null && host.matches("\\[.*\\]"))
if (host != null && host.startsWith("[") && host.endsWith("]"))
return host.substring(1, host.length() - 1);
return host;
}