You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "M Kim (JIRA)" <ji...@apache.org> on 2014/08/14 10:20:12 UTC

[jira] [Updated] (LUCENE-5876) NPE in BoostQueryNodeBuilder.build

     [ https://issues.apache.org/jira/browse/LUCENE-5876?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

M Kim updated LUCENE-5876:
--------------------------

    Description: 
In BoostQueryNodeBuilder.build, the return variable, "query" can be null, but there is no null check for it. 

25) test1(Test0)java.lang.NullPointerException
        at org.apache.lucene.queryparser.flexible.standard.builders.BoostQueryNodeBuilder.build(BoostQueryNodeBuilder.java:49)
        at Test0.test1(Test0.java:4809)

public void test1() throws Throwable {
     BoostQueryNodeBuilder builder = new BoostQueryNodeBuilder();
     QuotedFieldQueryNode quotedNode = new QuotedFieldQueryNode((java.lang.CharSequence)"hi!", (java.lang.CharSequence)"", 10, 100);
     BoostQueryNode node = new BoostQueryNode((QueryNode)quotedNode, 2.0f);
     builder.build((QueryNode)node);
}



  was:
In BoostQueryNodeBuilder.build, the return variable, "query" can be null, but there is no null check for it. 

25) test125(RandoopTest0)java.lang.NullPointerException
        at org.apache.lucene.queryparser.flexible.standard.builders.BoostQueryNodeBuilder.build(BoostQueryNodeBuilder.java:49)
        at RandoopTest0.test125(RandoopTest0.java:4809)

public void test125() throws Throwable {
BoostQueryNodeBuilder var0 = new BoostQueryNodeBuilder();
QuotedFieldQueryNode var5 = new QuotedFieldQueryNode((java.lang.CharSequence)"hi!", (java.lang.CharSequence)"", 10, 100);
BoostQueryNode var15 = new BoostQueryNode((QueryNode)var5, 2.0f);
var0.build((QueryNode)var15);
}




> NPE in BoostQueryNodeBuilder.build
> ----------------------------------
>
>                 Key: LUCENE-5876
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5876
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/queryparser
>    Affects Versions: 4.9
>            Reporter: M Kim
>
> In BoostQueryNodeBuilder.build, the return variable, "query" can be null, but there is no null check for it. 
> 25) test1(Test0)java.lang.NullPointerException
>         at org.apache.lucene.queryparser.flexible.standard.builders.BoostQueryNodeBuilder.build(BoostQueryNodeBuilder.java:49)
>         at Test0.test1(Test0.java:4809)
> public void test1() throws Throwable {
>      BoostQueryNodeBuilder builder = new BoostQueryNodeBuilder();
>      QuotedFieldQueryNode quotedNode = new QuotedFieldQueryNode((java.lang.CharSequence)"hi!", (java.lang.CharSequence)"", 10, 100);
>      BoostQueryNode node = new BoostQueryNode((QueryNode)quotedNode, 2.0f);
>      builder.build((QueryNode)node);
> }



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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