Solr
  1. Solr
  2. SOLR-8194

Improve error reporting UpdateRequest

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial 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
        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
        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
        Markus Jelsma added a comment -

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

        Show
        Markus Jelsma added a comment - Agreed! The the call immediately throws NPE, it is clear enough.
        Hide
        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
        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
        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
        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
        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
        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
        Alan Woodward added a comment -

        Thanks Markus!

        Show
        Alan Woodward added a comment - Thanks Markus!

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development