[
https://issues.apache.org/jira/browse/SOLR-8765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15188937#comment-15188937
]
Alan Woodward commented on SOLR-8765:
-------------------------------------
Everywhere that was actually using the validator had exactly the same pattern:
{code}
name = inputname;
if (!SolrIdentifierValidator.validate(name))
throw IllegalArgumentException("exactly the same error message");
{code}
so it seemed to make sense to me to pull that into the method. The boolean
method is still in SolrIdentifierValidator, although it's now private, but I
can make it public again if that helps things.
re changing the Exception type, I agree that it's not ideal, but keeping it as
IAE ended up losing information when exceptions were propagated in
TestCollectionAPI. Looking at it again, though, this is mainly due to the
tests there not using CollectionsAdminRequests explicitly, so there's no
client-side checking. I'll see if I can change it back again.
> Enforce required parameters in SolrJ Collection APIs
> ----------------------------------------------------
>
> Key: SOLR-8765
> URL: https://issues.apache.org/jira/browse/SOLR-8765
> Project: Solr
> Issue Type: Improvement
> Reporter: Alan Woodward
> Assignee: Alan Woodward
> Fix For: 6.1
>
> Attachments: SOLR-8765.patch, SOLR-8765.patch
>
>
> Several Collection API commands have required parameters. We should make
> these constructor parameters, to enforce setting these in the API.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]