Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9701

NPE in export handler when "fl" parameter is omitted.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.4
    • Fix Version/s: 6.4, 7.0
    • Component/s: None
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      This started when a user reported that if you do not specify any parameters for the export handler, you get an NPE. I tracked it down to not specifying an "fl" parameter.

      But in general I rearranged the error reporting in SortingResponseWriter.write so that immediately upon detecting a problem, the exception gets written to the output stream and then return immediately rather than save it up for the end. Preliminary version of the patch attached; it fixes the immediate problem.

      Still to see is if it breaks any tests since the first error detected will be returned to the user rather than the last. I'll fix any tests that are sensitive to this and check in sometime this weekend.

      1. SOLR-9701.patch
        5 kB
        Erick Erickson
      2. SOLR-9701.patch
        3 kB
        Erick Erickson

        Issue Links

          Activity

          Hide
          erickerickson Erick Erickson added a comment -

          Preliminary patch, still to run full test suite.

          Show
          erickerickson Erick Erickson added a comment - Preliminary patch, still to run full test suite.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 42eab7035ed0d5ebc7ba87f8c08a7677b87b7bef in lucene-solr's branch refs/heads/master from Erick Erickson
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=42eab70 ]

          SOLR-9701: NPE in export handler when fl parameter is omitted.

          Show
          jira-bot ASF subversion and git services added a comment - Commit 42eab7035ed0d5ebc7ba87f8c08a7677b87b7bef in lucene-solr's branch refs/heads/master from Erick Erickson [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=42eab70 ] SOLR-9701 : NPE in export handler when fl parameter is omitted.
          Hide
          erickerickson Erick Erickson added a comment -

          Final patch with tests.

          Show
          erickerickson Erick Erickson added a comment - Final patch with tests.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 807ba8c60c43b277fe2d04e8d7f5d83689e255bb in lucene-solr's branch refs/heads/branch_6x from Erick Erickson
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=807ba8c ]

          SOLR-9701: NPE in export handler when fl parameter is omitted.
          (cherry picked from commit 42eab70)

          Show
          jira-bot ASF subversion and git services added a comment - Commit 807ba8c60c43b277fe2d04e8d7f5d83689e255bb in lucene-solr's branch refs/heads/branch_6x from Erick Erickson [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=807ba8c ] SOLR-9701 : NPE in export handler when fl parameter is omitted. (cherry picked from commit 42eab70)

            People

            • Assignee:
              erickerickson Erick Erickson
              Reporter:
              erickerickson Erick Erickson
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development