boolean (@Nullable String uriHost) { if (StringUtil.isEmptyOrSpaces(uriHost) || StringUtil.isEmptyOrSpaces(PROXY_EXCEPTIONS)) { return false; } List<String> hosts = StringUtil.split(PROXY_EXCEPTIONS, ","); for (String hostPattern : hosts) { String regexpPattern = StringUtil.escapeToRegexp(hostPattern.trim()).replace("\\*", ".*"); if (Pattern.compile(regexpPattern).matcher(uriHost).matches()) { return true; } } return false; }