Uploaded image for project: 'Tika'
  1. Tika
  2. TIKA-1720

Collect multiple exceptions in TemporaryResources.close() using Throwable.addSuppressed()

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.11
    • core
    • None
    • Patch

    Description

      TemporaryResource.close() currently collects exceptions throw by trying to close its resources in a list.
      When the time to propagate an exception comes, information is lost - the thrown exception contains a message with the string descriptions of all exceptions, and the first exception as the cause - there is no stack trace describing what went wrong closing a resource.
      In addition, the thrown exception is IOExceptionWithCause, copied from commons-io, which is redundant since Java 6.

      Attachments

        1. TIKA-1720.patch
          2 kB
          Yaniv Kunda

        Activity

          People

            jukkaz Jukka Zitting
            kunda Yaniv Kunda
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: