-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TEST]
getObjectMetadata
should also refine FileNotFoundException
While working on a use-case in which we first check for object existence via `getObjectMetadata` before we use `putObject` in order to save bandwidth, I realized that when using the test stub the tests were failing with an `NoSuchFileException`. This was due to the fact that `getObjectMetadata` does not refine the `NoSuchFileException` like `getObject` does with `FileNotFoundException`. This commit adds refinement of these exceptions to `getObjectMetadata` analogous to `getObject`. The `fileNotFound` function needs to be adapted to `Throwable` because `java.nio.*` and `java.io.*` do not share an error hierarchy.
- Loading branch information
Showing
2 changed files
with
14 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters