cryptomator / cryptofs

Java Filesystem Provider with integrated encryption
GNU Affero General Public License v3.0
93 stars 35 forks source link

migrated from Guava Cache to Caffeine #164

Closed overheadhunter closed 1 year ago

overheadhunter commented 1 year ago

fixes #162

infeo commented 1 year ago

I gave this PR another look and noticed, that we have different handling of the UncheckedIOExceptions:

  1. Rewrap it in a generic IOException, loosing direct type information about what failed (e.g., https://github.com/cryptomator/cryptofs/pull/164/files#diff-2261d9d07dd9f059e74785d49eb7ed731d267b4f53eb030617ac116fe22b9ad6R161-R170)
  2. Unwrap and rethrow the cause, as done in https://github.com/cryptomator/cryptofs/pull/164/files#diff-bda48bb261f4b28cb28912d63eaffd3f12979360757e812b8f45784be17ac850L73-L80

@overheadhunter What is the logic behind it?

overheadhunter commented 1 year ago

The latter is to satisfy unit tests that expect to catch a NoSuchFileException instead of a generic IOException. Not sure if this is just for tests or actually needed downstream, but I thought I better not change the behavior of public API.