Skip to content

Conversation

@LikeTheSalad
Copy link
Contributor

Description:

Adding validations for cases when trying to deserialize contents from a corrupted file. These changes aim to remove the corrupted file in those cases while avoiding throwing any exceptions to the caller.

Existing Issue(s):

open-telemetry/opentelemetry-android#457

Testing:

Unit tests

Documentation:

Outstanding items:

@LikeTheSalad LikeTheSalad requested a review from a team November 26, 2024 13:49
@github-actions github-actions bot requested a review from zeitlinger November 26, 2024 13:50
@zeitlinger zeitlinger removed their assignment Nov 27, 2024

@Test
void whenDeserializationFails_returnFalse() throws IOException {
when(deserializer.deserialize(any()))
Copy link
Member

Choose a reason for hiding this comment

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

nit: doThrow is simpler

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I added the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants