Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.4.0 Release
-
None
Description
The class org.apache.commons.validator.routines.DomainValidator contains several hard coded arrays of TLD names. Quite apart from whether these should be in a properties file rather than the source file itself, they are then used to populate List instances via Arrays.asList() and the List.contains() method used when validating a TLD. This is almost inevitably an O operation on each list, and could be improved by populating a single HashSet which would provide O(1) performance.