Adding an aggregate exception class to the interface module to be use… - #436
Conversation
…d to return back multiple exceptions from the metadata restoration logic.
| @@ -45,17 +54,41 @@ public void metadataReceived(final String filename, final Metadata metadata) { | |||
| * @param metadata metadata which needs to be set on local file | |||
| */ | |||
| private void restoreMetaData(final String objectName, final Metadata metadata) throws IOException, InterruptedException { | |||
There was a problem hiding this comment.
should this method throw AggregateException now?
There was a problem hiding this comment.
It's not required since I made AggregateException extend RuntimeException.
|
you don't want to add test for the new AggregateException? |
|
I probably should... |
| this.exceptions = exceptionList(exceptions); | ||
| } | ||
|
|
||
| private static List<Throwable> exceptionList(final Iterable<Throwable> exceptions) { |
There was a problem hiding this comment.
I'm not sure I understand the need to make a mutable copy of the iterable contents, since the getter returns an iterable. Though it's most likely not a big deal in terms of the amount of space used to make a copy, I'm wondering about the immutable -> mutable ness.
There was a problem hiding this comment.
The main reason is I wanted to make sure that the iterable we return in the getter can be called multiple times. I wanted to make the list immutable, but we've not included guava in the interfaces module, which is why I made it with a mutable type.
…d to return back multiple exceptions from the metadata restoration logic.