diff options
author | Tobias Sargeant <tobiasjs@google.com> | 2018-11-26 21:48:13 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2018-11-26 21:48:13 +0000 |
commit | e227daebe38b7f5e35115c49562f6b6a109ffb15 (patch) | |
tree | 0088da68a98901682706e5397a36a006efefaa53 /src/org | |
parent | 96dd6679dfaeb18044269290d14ebcb275b72493 (diff) | |
download | webview_support_interfaces-e227daebe38b7f5e35115c49562f6b6a109ffb15.tar.gz |
[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/1349974
Reviewed-by: Nate Fischer <ntfschr@chromium.org>
Commit-Queue: Tobias Sargeant <tobiasjs@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#610953}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4e22362069a8eaa5eed015bf7cb29a5ee031c7bf
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/chromium/support_lib_boundary/IsomorphicObjectBoundaryInterface.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/org/chromium/support_lib_boundary/IsomorphicObjectBoundaryInterface.java b/src/org/chromium/support_lib_boundary/IsomorphicObjectBoundaryInterface.java index a0e3846..7cccfc4 100644 --- a/src/org/chromium/support_lib_boundary/IsomorphicObjectBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/IsomorphicObjectBoundaryInterface.java @@ -35,5 +35,5 @@ public interface IsomorphicObjectBoundaryInterface { * @return The peer object associated with this object, which either exists already, or has * been freshly created and recorded. */ - Object getOrCreatePeer(Callable<Object> creationCallable) throws Exception; + Object getOrCreatePeer(Callable<Object> creationCallable); } |