[
https://issues.apache.org/jira/browse/VALIDATOR-341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14580369#comment-14580369
]
Sebb commented on VALIDATOR-341:
--------------------------------
Regarding the patch: VALIDATOR requires Java 1.6+, so enums can be used.
Also I don't think the custom lists are accessed in a thread-safe manner.
It's not enough to synchronise write access; read access also has to be
synchronised.
Probably better to use a concurrent list.
Alternatively, build the list locally and sort it first, then update the static
pointer.
However the static pointer must still be updated and read using synch. - or it
could be volatile - to ensure safe publication across threads.
The CUSTOM lists are not final, so should not have names in CAPS.
> Make TLD list configurable
> --------------------------
>
> Key: VALIDATOR-341
> URL: https://issues.apache.org/jira/browse/VALIDATOR-341
> Project: Commons Validator
> Issue Type: New Feature
> Components: Framework
> Reporter: Benedikt Ritter
> Labels: TLD, domains, email
> Attachments: RequestForComments.patch
>
>
> Since the list of valid TLDs changes from time to time, it makes sense to let
> users configure the list of valid TLDs.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)