replace regex match with simple string comparisons
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
parent
6527b3b083
commit
87be7b15eb
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue