Details

    • Lucene Fields:
      New

      Description

      Hi
      Please, look this code fragment:

          else if (q1 instanceof AndQueryNode)
            op = ANDOperation.Q1;
          else if (q1 instanceof AndQueryNode)
            op = ANDOperation.Q2;
      

      (q1 instanceof AndQueryNode) is checked twice.

      Probably it should be:

          else if (q1 instanceof AndQueryNode)
            op = ANDOperation.Q1;
          else if (q2 instanceof AndQueryNode)
            op = ANDOperation.Q2;
      

      This possible defect found by AppChecker

        Issue Links

          Activity

          Hide
          sarkaramrit2@gmail.com Amrit Sarkar added a comment -

          That's a legit code bug, wonder how it was not reported till now.

          Show
          sarkaramrit2@gmail.com Amrit Sarkar added a comment - That's a legit code bug, wonder how it was not reported till now.
          Hide
          sarkaramrit2@gmail.com Amrit Sarkar added a comment -

          BTW this is part of LUCENE than SOLR, it should be reported in Lucene project.

          Show
          sarkaramrit2@gmail.com Amrit Sarkar added a comment - BTW this is part of LUCENE than SOLR, it should be reported in Lucene project.
          Hide
          sarkaramrit2@gmail.com Amrit Sarkar added a comment -

          Seems like QueryNodeOperation.java is never referred and used anywhere.

          Show
          sarkaramrit2@gmail.com Amrit Sarkar added a comment - Seems like QueryNodeOperation.java is never referred and used anywhere.
          Hide
          sarkaramrit2@gmail.com Amrit Sarkar added a comment - - edited

          Already listed: LUCENE-5365

          Show
          sarkaramrit2@gmail.com Amrit Sarkar added a comment - - edited Already listed: LUCENE-5365
          Hide
          thetaphi Uwe Schindler added a comment -

          I marked this as a duplicate of LUCENE-5365. Issue closed.

          Show
          thetaphi Uwe Schindler added a comment - I marked this as a duplicate of LUCENE-5365 . Issue closed.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 0ed39b2774c1c39faf5a6c4cfc9cb68540b16f11 in lucene-solr's branch refs/heads/master from Uwe Schindler
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=0ed39b2 ]

          LUCENE-5365, LUCENE-7818: Fix incorrect condition in queryparser's QueryNodeOperation#logicalAnd()

          Show
          jira-bot ASF subversion and git services added a comment - Commit 0ed39b2774c1c39faf5a6c4cfc9cb68540b16f11 in lucene-solr's branch refs/heads/master from Uwe Schindler [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=0ed39b2 ] LUCENE-5365 , LUCENE-7818 : Fix incorrect condition in queryparser's QueryNodeOperation#logicalAnd()
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit a46b5fc1b6609b6b7723f328c6150c314e3c0d9c in lucene-solr's branch refs/heads/branch_6x from Uwe Schindler
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=a46b5fc ]

          LUCENE-5365, LUCENE-7818: Fix incorrect condition in queryparser's QueryNodeOperation#logicalAnd()

          Show
          jira-bot ASF subversion and git services added a comment - Commit a46b5fc1b6609b6b7723f328c6150c314e3c0d9c in lucene-solr's branch refs/heads/branch_6x from Uwe Schindler [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=a46b5fc ] LUCENE-5365 , LUCENE-7818 : Fix incorrect condition in queryparser's QueryNodeOperation#logicalAnd()

            People

            • Assignee:
              thetaphi Uwe Schindler
              Reporter:
              AppChecker AppChecker
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development