Skip to content

Commit 4e2e0d0

Browse files
bitterfoxbrian-brazil
authored andcommitted
Fix Timer#close signature to not throws IOException
1 parent 3d904c2 commit 4e2e0d0

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

simpleclient/src/main/java/io/prometheus/client/Gauge.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package io.prometheus.client;
22

33
import java.io.Closeable;
4-
import java.io.IOException;
54
import java.util.ArrayList;
65
import java.util.Collections;
76
import java.util.List;
@@ -120,10 +119,9 @@ public double setDuration() {
120119

121120
/**
122121
* Equivalent to calling {@link #setDuration()}.
123-
* @throws IOException
124122
*/
125123
@Override
126-
public void close() throws IOException {
124+
public void close() {
127125
setDuration();
128126
}
129127
}

simpleclient/src/main/java/io/prometheus/client/Histogram.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package io.prometheus.client;
22

33
import java.io.Closeable;
4-
import java.io.IOException;
54
import java.util.ArrayList;
65
import java.util.Collections;
76
import java.util.List;
@@ -175,10 +174,9 @@ public double observeDuration() {
175174

176175
/**
177176
* Equivalent to calling {@link #observeDuration()}.
178-
* @throws IOException
179177
*/
180178
@Override
181-
public void close() throws IOException {
179+
public void close() {
182180
observeDuration();
183181
}
184182
}

simpleclient/src/main/java/io/prometheus/client/Summary.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import io.prometheus.client.CKMSQuantiles.Quantile;
44

55
import java.io.Closeable;
6-
import java.io.IOException;
76
import java.util.ArrayList;
87
import java.util.Collections;
98
import java.util.List;
@@ -182,10 +181,9 @@ public double observeDuration() {
182181

183182
/**
184183
* Equivalent to calling {@link #observeDuration()}.
185-
* @throws IOException
186184
*/
187185
@Override
188-
public void close() throws IOException {
186+
public void close() {
189187
observeDuration();
190188
}
191189
}

0 commit comments

Comments
 (0)