Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-16889

Error-prone X#searchForCause() implementation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.12
    • None
    • general
    • Docs Required, Release Notes Required

    Description

      The X#seachForCause utility method fails with a NullPointerException if the analyzed Throwable has no suppressed exception due to the missing null check.

      I never encountered any issues with that with real usage of Ignite. However, writing a unit test that stabs the IgniteCache methods to throw an exception without initialized suppressed exceptions results in the stabbed method to return null instead of throwing an exception. The workaround is to properly initialize the suppressed list in the mocked exception.

      I suggest to make the generic X#seachForCause utility method handle the case when the suppressed list is not initialized. That would simplify the unit tests code.

      Attachments

        Activity

          People

            Unassigned Unassigned
            kukushal Alexey Kukushkin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 16h
                16h
                Remaining:
                Remaining Estimate - 16h
                16h
                Logged:
                Time Spent - Not Specified
                Not Specified