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

Improve error reporting UpdateRequest

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 5.3
    • Fix Version/s: 5.4
    • Component/s: None
    • Labels:
      None

      Description

      SolrJ throws NPE if null documents are added to UpdateRequest. It should report a proper error message so i don't get confused the next time i skrew up. Please see: https://www.mail-archive.com/solr-user@lucene.apache.org/msg115074.html

      1. SOLR-8194.patch
        7 kB
        Alan Woodward

        Activity

        Hide
        romseygeek Alan Woodward added a comment -

        Throwing NPE is fine, I think, but we should do that when add() is called, rather than later during processing.

        Show
        romseygeek Alan Woodward added a comment - Throwing NPE is fine, I think, but we should do that when add() is called, rather than later during processing.
        Hide
        markus17 Markus Jelsma added a comment -

        Agreed! The the call immediately throws NPE, it is clear enough.

        Show
        markus17 Markus Jelsma added a comment - Agreed! The the call immediately throws NPE, it is clear enough.
        Hide
        romseygeek Alan Woodward added a comment -

        Patch adding Objects.requireNonNull() checks to the various UpdateRequest.add() methods, and some javadoc as well for good measure. I'll get this in before the 5.4 branch is created.

        Show
        romseygeek Alan Woodward added a comment - Patch adding Objects.requireNonNull() checks to the various UpdateRequest.add() methods, and some javadoc as well for good measure. I'll get this in before the 5.4 branch is created.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1715749 from Alan Woodward in branch 'dev/trunk'
        [ https://svn.apache.org/r1715749 ]

        SOLR-8194: Improve error reporting of nulls in UpdateRequest

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1715749 from Alan Woodward in branch 'dev/trunk' [ https://svn.apache.org/r1715749 ] SOLR-8194 : Improve error reporting of nulls in UpdateRequest
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1715750 from Alan Woodward in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1715750 ]

        SOLR-8194: Improve error reporting of nulls in UpdateRequest

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1715750 from Alan Woodward in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1715750 ] SOLR-8194 : Improve error reporting of nulls in UpdateRequest
        Hide
        romseygeek Alan Woodward added a comment -

        Thanks Markus!

        Show
        romseygeek Alan Woodward added a comment - Thanks Markus!

          People

          • Assignee:
            romseygeek Alan Woodward
            Reporter:
            markus17 Markus Jelsma
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development