[ 
https://issues.apache.org/jira/browse/LUCENE-6345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14362714#comment-14362714
 ] 

Lee Hinman commented on LUCENE-6345:
------------------------------------

I'm going to work on this.

Looking through the code, I see a mixture of:

{noformat}
Term t = Objects.requireNonNull(term);
{noformat}

As well as:

{noformat}
if (term == null) {
  throw new IllegalArgumentException("Term must not be null");
}
{noformat}

Any particular preference here? I think an explicit message is nicer but I can 
go either way. If no one has an opinion about it I'll pick one and go with it :)

> null check all term/fields in queries
> -------------------------------------
>
>                 Key: LUCENE-6345
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6345
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>
> See the mail thread "is this lucene 4.1.0 bug in PerFieldPostingsFormat".
> If anyone seriously thinks adding a null check to ctor will cause measurable 
> slowdown to things like regexp or wildcards, they should have their head 
> examined.
> All queries should just check this crap in ctor and throw exceptions if 
> parameters are invalid.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to