Skip to content

Commit

Permalink
Fix Timer#close signature to not throws IOException
Browse files Browse the repository at this point in the history
  • Loading branch information
bitterfox authored and brian-brazil committed May 26, 2017
1 parent 3d904c2 commit 4e2e0d0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
4 changes: 1 addition & 3 deletions simpleclient/src/main/java/io/prometheus/client/Gauge.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -120,10 +119,9 @@ public double setDuration() {

/**
* Equivalent to calling {@link #setDuration()}.
* @throws IOException
*/
@Override
public void close() throws IOException {
public void close() {
setDuration();
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -175,10 +174,9 @@ public double observeDuration() {

/**
* Equivalent to calling {@link #observeDuration()}.
* @throws IOException
*/
@Override
public void close() throws IOException {
public void close() {
observeDuration();
}
}
Expand Down
4 changes: 1 addition & 3 deletions simpleclient/src/main/java/io/prometheus/client/Summary.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -182,10 +181,9 @@ public double observeDuration() {

/**
* Equivalent to calling {@link #observeDuration()}.
* @throws IOException
*/
@Override
public void close() throws IOException {
public void close() {
observeDuration();
}
}
Expand Down

0 comments on commit 4e2e0d0

Please sign in to comment.