Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-12472

Make GenericTestUtils.assertExceptionContains robust

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.0.0-alpha1
    • 2.8.0, 3.0.0-alpha1, 2.7.6
    • test
    • None
    • Reviewed

    Description

      GenericTestUtils.assertExceptionContains calls Exception.getMessage(), followed by msg.contains().

      This will NPE for an exception with a null message, such as NPE.

      1. it should call toString()
      2. and do an assertNotNull on the result in case some subclass does something very bad
      3. and for safety, check the asser

      Attachments

        1. HADOOP-12472-001.patch
          4 kB
          Steve Loughran

        Issue Links

          Activity

            People

              stevel@apache.org Steve Loughran
              stevel@apache.org Steve Loughran
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: