MatcherFactory.config(...) performs startsWith comparisons on URL strings. Since validURL(...) will be called in most cases, thus paying the penalty of the full URL parsing mechanism, it would seem to be better style to first construct the URL, then call getProtocol() to extract the protocol name for comparison testing.
MatcherFactory.config(...) performs startsWith comparisons on URL strings. Since validURL(...) will be called in most cases, thus paying the penalty of the full URL parsing mechanism, it would seem to be better style to first construct the URL, then call getProtocol() to extract the protocol name for comparison testing.