commit | d285496d44d8e49378910ea28fc8a77d4a86bf9f | [log] [tgz] |
---|---|---|
author | Edwin Kempin <ekempin@google.com> | Mon Jul 01 09:58:46 2019 +0200 |
committer | Edwin Kempin <ekempin@google.com> | Mon Jul 01 09:58:46 2019 +0200 |
tree | 9121ad4f9e06087319ddbcad885302783d522ea1 | |
parent | 8c6baf54bc9b889a8999815ef4281bc99efeed5e [diff] |
Adapt to change in Gerrit core that added generic types to time contexts Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: If0ed7a293ae226a0f974983662588133bf646bfd
diff --git a/src/main/java/com/googlesource/gerrit/plugins/hooks/HookMetrics.java b/src/main/java/com/googlesource/gerrit/plugins/hooks/HookMetrics.java index c2046a1..e5dd877 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/hooks/HookMetrics.java +++ b/src/main/java/com/googlesource/gerrit/plugins/hooks/HookMetrics.java
@@ -47,7 +47,7 @@ "timeout", new Description("Hook execution timeouts").setRate(), field); } - public Timer1.Context start(String name) { + public Timer1.Context<String> start(String name) { return latency.start(name); }
diff --git a/src/main/java/com/googlesource/gerrit/plugins/hooks/HookTask.java b/src/main/java/com/googlesource/gerrit/plugins/hooks/HookTask.java index 4ff5d94..ee59fb4 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/hooks/HookTask.java +++ b/src/main/java/com/googlesource/gerrit/plugins/hooks/HookTask.java
@@ -85,7 +85,7 @@ public HookResult runHook() { HookResult result = null; String name = getName(); - try (Timer1.Context timer = args.metrics.start(name)) { + try (Timer1.Context<String> timer = args.metrics.start(name)) { args.metrics.count(name); List<String> argv = new ArrayList<>(1 + args.get().size()); argv.add(hook.toAbsolutePath().toString());