OpenSextant / OpenSextantToolbox

A geotagger and entity extractor
Other
15 stars 7 forks source link

MatcherFactory Parses URLs as Strings #4

Closed CraigMiloRogers closed 11 years ago

CraigMiloRogers commented 11 years ago

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.

dlutz2 commented 11 years ago

Will consider refactoring MatcherFactory.config(), as part of ongoing simplification of start up process.