lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Otis Gospodnetic (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (LUCENE-1246) Missing a null check in BooleanQuery.toString(String)
Date Sat, 17 May 2008 02:27:55 GMT

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

otis edited comment on LUCENE-1246 at 5/16/08 7:26 PM:
-------------------------------------------------------------------

Could one argue that maybe your queryParser/tokenizer shouldn't create null queries and add
them to BooleanQuery clauses?

Your patch uses different spacing (should be 2) .

Also, check this:

===================================================================
--- /Users/jwang/projects/lucene_2_3_1/src/java/org/apache/lucene/search/BooleanQuery.java
(revision 641933)
+++ /Users/jwang/projects/lucene_2_3_1/src/java/org/apache/lucene/search/BooleanQuery.java
(working copy)


Note the full path to the modified file.  You should make a diff with "svn diff src/java/....."
instead.

Thanks.

      was (Author: otis):
    Could one argue that maybe your queryParser/tokenizer shouldn't create null queries and
add them to BooleanQuery clauses?

Your patch uses different spacing (should be 2) .

  
> Missing a null check in BooleanQuery.toString(String)
> -----------------------------------------------------
>
>                 Key: LUCENE-1246
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1246
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Query/Scoring
>    Affects Versions: 2.3.1
>            Reporter: John Wang
>            Assignee: Otis Gospodnetic
>            Priority: Minor
>         Attachments: BooleanQueryNPE.txt
>
>
> Our queryParser/tokenizer in some situations creates null query and was added as a clause
to Boolean query.
> When we try to log the query, NPE is thrown from log(booleanQuery).
> In BooleanQuery.toString(String), a simple null check is overlooked.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message