[jira] [Commented] (LUCENE-6345) null check all term/fields in queries

2015-04-16 Thread Michael McCandless (JIRA)

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

Michael McCandless commented on LUCENE-6345:


Thanks [~dakrone], patch looks great.  I found one small fix:

{noformat}
   public void add(BooleanClause clause) {
+Objects.requireNonNull(BooleanClause must not be null);
 if (clauses.size() = maxClauseCount) {
   throw new TooManyClauses();
 }
{noformat}

I'll fix  commit ...

 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
 Attachments: LUCENE-6345.patch, LUCENE-6345.patch


 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



[jira] [Commented] (LUCENE-6345) null check all term/fields in queries

2015-04-16 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on LUCENE-6345:
-

Commit 1674124 from [~mikemccand] in branch 'dev/trunk'
[ https://svn.apache.org/r1674124 ]

LUCENE-6345: add null checking for query parameters

 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
 Attachments: LUCENE-6345.patch, LUCENE-6345.patch


 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



[jira] [Commented] (LUCENE-6345) null check all term/fields in queries

2015-04-16 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on LUCENE-6345:
-

Commit 1674134 from [~mikemccand] in branch 'dev/branches/branch_5x'
[ https://svn.apache.org/r1674134 ]

LUCENE-6345: add null checking for query parameters

 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
 Fix For: Trunk, 5.2

 Attachments: LUCENE-6345.patch, LUCENE-6345.patch


 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



[jira] [Commented] (LUCENE-6345) null check all term/fields in queries

2015-03-15 Thread Lee Hinman (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-6345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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



[jira] [Commented] (LUCENE-6345) null check all term/fields in queries

2015-03-06 Thread Michael McCandless (JIRA)

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

Michael McCandless commented on LUCENE-6345:


+1

 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