diff --git a/simpleclient/src/main/java/io/prometheus/client/Gauge.java b/simpleclient/src/main/java/io/prometheus/client/Gauge.java index 049a574f0..3473cedf0 100644 --- a/simpleclient/src/main/java/io/prometheus/client/Gauge.java +++ b/simpleclient/src/main/java/io/prometheus/client/Gauge.java @@ -1,7 +1,6 @@ package io.prometheus.client; import java.io.Closeable; -import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -120,10 +119,9 @@ public double setDuration() { /** * Equivalent to calling {@link #setDuration()}. - * @throws IOException */ @Override - public void close() throws IOException { + public void close() { setDuration(); } } diff --git a/simpleclient/src/main/java/io/prometheus/client/Histogram.java b/simpleclient/src/main/java/io/prometheus/client/Histogram.java index 5397d6eb8..c5ed9060a 100644 --- a/simpleclient/src/main/java/io/prometheus/client/Histogram.java +++ b/simpleclient/src/main/java/io/prometheus/client/Histogram.java @@ -1,7 +1,6 @@ package io.prometheus.client; import java.io.Closeable; -import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -175,10 +174,9 @@ public double observeDuration() { /** * Equivalent to calling {@link #observeDuration()}. - * @throws IOException */ @Override - public void close() throws IOException { + public void close() { observeDuration(); } } diff --git a/simpleclient/src/main/java/io/prometheus/client/Summary.java b/simpleclient/src/main/java/io/prometheus/client/Summary.java index c9cb39e6e..6bda32dc0 100644 --- a/simpleclient/src/main/java/io/prometheus/client/Summary.java +++ b/simpleclient/src/main/java/io/prometheus/client/Summary.java @@ -3,7 +3,6 @@ import io.prometheus.client.CKMSQuantiles.Quantile; import java.io.Closeable; -import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -182,10 +181,9 @@ public double observeDuration() { /** * Equivalent to calling {@link #observeDuration()}. - * @throws IOException */ @Override - public void close() throws IOException { + public void close() { observeDuration(); } }