Skip to content

Conversation

@rpmoore
Copy link
Contributor

@rpmoore rpmoore commented Feb 2, 2017

…d to return back multiple exceptions from the metadata restoration logic.

…d to return back multiple exceptions from the metadata restoration logic.
* @param objectName name of the file to be restored
* @param metadata metadata which needs to be set on local file
*/
private void restoreMetaData(final String objectName, final Metadata metadata) throws IOException, InterruptedException {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this method throw AggregateException now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not required since I made AggregateException extend RuntimeException.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@shabtaisharon
Copy link
Contributor

you don't want to add test for the new AggregateException?

@rpmoore
Copy link
Contributor Author

rpmoore commented Feb 2, 2017

I probably should...

this.exceptions = exceptionList(exceptions);
}

private static List<Throwable> exceptionList(final Iterable<Throwable> exceptions) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@GraciesPadre GraciesPadre merged commit 9408b66 into SpectraLogic:3_2_11 Feb 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants