TrueZIP
  1. TrueZIP
  2. TRUEZIP-290

TFile.compact() should not swallow the original exception when TFile.rm() fails

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: TrueZIP 7.6.4
    • Fix Version/s: TrueZIP 7.6.5
    • Component/s: TrueZIP File*
    • Labels:
      None

      Description

      When calling TFile.compact() fails with an IOException, the buffer file used for compacting gets removed. However, this may fail with another IOException, too. In this case, the original IOException gets suppressed. This is bad because it makes it hard to analyze the root cause.

        Activity

        Hide
        Christian Schlichtherle added a comment -

        Changeset: e36024cdc3b6
        Author: Christian Schlichtherle <christian AT schlichtherle DOT de>
        Date: 2012-09-13 19:09
        Message: Now using Throwable.addSuppressed if JSE7.AVAILABLE.
        Otherwise just discards the second IOException.
        Issue #TRUEZIP-290 - TFile.compact() should not swallow the original exception when TFile.rm() fails

        Show
        Christian Schlichtherle added a comment - Changeset: e36024cdc3b6 Author: Christian Schlichtherle <christian AT schlichtherle DOT de> Date: 2012-09-13 19:09 Message: Now using Throwable.addSuppressed if JSE7.AVAILABLE. Otherwise just discards the second IOException. Issue # TRUEZIP-290 - TFile.compact() should not swallow the original exception when TFile.rm() fails

          People

          • Assignee:
            Christian Schlichtherle
            Reporter:
            Christian Schlichtherle
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: