[supportlib] getOrCreatePeer shouldn't throw a checked exception.
We are restricted to use functor-like objects that are part of the root classloader. This means that changing from Callable is not practical. However the fact that Callable#call can throw a checked exception is inconvenient for code that uses getOrCreatePeer, especially as it is not expected that the peer creation callable will ever actually throw. For this reason, it's best if getOrCreatePeer rethrows the checked exception wrapped in an unchecked RuntimeException. Bug: 908269 Change-Id: I726d1cc75f13cafa9f62169069a237cc9e129b4d Reviewed-on: https://chromium-review.googlesource.com/c/1349974Reviewed-by:Nate Fischer <ntfschr@chromium.org> Commit-Queue: Tobias Sargeant <tobiasjs@chromium.org> Cr-Commit-Position: refs/heads/master@{#610953}
Showing
Please register or sign in to comment