commit | 8419e92cb014c1fa5a1f1757e187bf880f99b476 | [log] [tgz] |
---|---|---|
author | Dave Borowitz <dborowitz@google.com> | Mon Mar 21 12:04:48 2016 -0400 |
committer | Dave Borowitz <dborowitz@google.com> | Tue Mar 22 09:44:18 2016 -0400 |
tree | 5cc05585e296f52f71afcc4c95bac30080dd9581 | |
parent | 30fe5d82b1e3041fbd4a7265ef42a61b394e17c6 [diff] |
Remove usages of Throwables#propagate Guava intends to deprecate these, and recommends the 2-line inlining of the method instead. Change-Id: I74a45915effaae2f29090f27b9b258e2c7c9a7d0
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java b/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java index aca5fa2..46fb5ee 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java
@@ -262,7 +262,8 @@ stateLog.error(String.format("source project %s not available", project), err, states); } catch (Exception e) { - throw Throwables.propagate(e); + Throwables.propagateIfPossible(e); + throw new RuntimeException(e); } return false; }
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java b/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java index e25b32a..2b3cbc0 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java
@@ -264,7 +264,8 @@ } }).call(); } catch (Exception e) { - throw Throwables.propagate(e); + Throwables.propagateIfPossible(e); + throw new RuntimeException(e); } finally { statesCleanUp(); }