Skip to content

Conversation

@copybara-service
Copy link
Contributor

Migrate more code to use UndeclaredThrowableException.

And generally make our handling more consistent (throwIfUnchecked + UndeclaredThrowableException with appropriate comments).

This is mostly a no-op (assuming that the undeclared throwables are in fact impossible :)), but I note that the old ChecksumHashFunction code appears to be wrapping any RuntimeException in an AssertionError, which would be bad if there were a practical chance of such a thing (though hopefully there is not).

Compare cl/686064398. I suspect that we could find yet more similar code.

RELNOTES=n/a

And generally make our handling more consistent (`throwIfUnchecked` + `UndeclaredThrowableException` with appropriate comments).

This is mostly a no-op (assuming that the undeclared throwables are in fact impossible :)), but I note that the old `ChecksumHashFunction` code appears to be wrapping any _`RuntimeException`_ in an `AssertionError`, which would be bad if there were a practical chance of such a thing (though hopefully there is not).

Compare cl/686064398. I suspect that we could find yet more similar code.

RELNOTES=n/a
PiperOrigin-RevId: 686883397
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.

2 participants