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

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

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.11
    • Component/s: core
    • Labels:
      None
    • Flags:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: