Skip to content

Commit ddd1533

Browse files
checkettsbrian-brazil
authored andcommitted
Fix spelling and missing @OverRide annotations (#179)
1 parent f6ab5d7 commit ddd1533

File tree

10 files changed

+14
-8
lines changed

10 files changed

+14
-8
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public interface Describable {
138138
*
139139
* Usually custom collectors do not have to implement Describable. If
140140
* Describable is not implemented and the CollectorRegistry was created
141-
* with auto desribe enabled (which is the case for the default registry)
141+
* with auto describe enabled (which is the case for the default registry)
142142
* then {@link collect} will be called at registration time instead of
143143
* describe. If this could cause problems, either implement a proper
144144
* describe, or if that's not practical have describe return an empty

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
* }
6262
* }
6363
* </pre>
64-
* These can be aggregated and processed together much more easily in the Promtheus
64+
* These can be aggregated and processed together much more easily in the Prometheus
6565
* server than individual metrics for each labelset.
6666
*/
6767
public class Counter extends SimpleCollector<Counter.Child> implements Collector.Describable {
@@ -149,6 +149,7 @@ public List<MetricFamilySamples> collect() {
149149
return mfsList;
150150
}
151151

152+
@Override
152153
public List<MetricFamilySamples> describe() {
153154
List<MetricFamilySamples> mfsList = new ArrayList<MetricFamilySamples>();
154155
mfsList.add(new CounterMetricFamily(fullname, help, labelNames));

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ public List<MetricFamilySamples> collect() {
254254
return mfsList;
255255
}
256256

257+
@Override
257258
public List<MetricFamilySamples> describe() {
258259
List<MetricFamilySamples> mfsList = new ArrayList<MetricFamilySamples>();
259260
mfsList.add(new GaugeMetricFamily(fullname, help, labelNames));

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ public List<MetricFamilySamples> collect() {
269269
return mfsList;
270270
}
271271

272+
@Override
272273
public List<MetricFamilySamples> describe() {
273274
List<MetricFamilySamples> mfsList = new ArrayList<MetricFamilySamples>();
274275
mfsList.add(new MetricFamilySamples(fullname, Type.HISTOGRAM, help, new ArrayList<MetricFamilySamples.Sample>()));

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* This class handles common initialization and label logic for the standard metrics.
1212
* You should never subclass this class.
1313
* <p>
14-
* <h2>Initilization</h2>
14+
* <h2>Initialization</h2>
1515
* After calling build() on a subclass, {@link Builder#name(String) name},
1616
* {@link SimpleCollector.Builder#help(String) help},
1717
* {@link SimpleCollector.Builder#labelNames(String...) labelNames},
@@ -26,7 +26,7 @@
2626
* <h2>Labels</h2>
2727
* {@link SimpleCollector.Builder#labelNames labelNames} specifies which (if any) labels the metrics will have, and
2828
* {@link #labels} returns the Child of the metric that represents that particular set of labels.
29-
* {@link Gauge}, {@link Counter} and {@link Summary} all offer convienence methods to avoid needing to call
29+
* {@link Gauge}, {@link Counter} and {@link Summary} all offer convenience methods to avoid needing to call
3030
* {@link #labels} for metrics with no labels.
3131
* <p>
3232
* {@link #remove} and {@link #clear} can be used to remove children.
@@ -50,7 +50,7 @@ public abstract class SimpleCollector<Child> extends Collector {
5050
protected final String help;
5151
protected final List<String> labelNames;
5252

53-
protected final ConcurrentMap<List<String>, Child> children = new ConcurrentHashMap<List<String>, Child>();;
53+
protected final ConcurrentMap<List<String>, Child> children = new ConcurrentHashMap<List<String>, Child>();
5454
protected Child noLabelsChild;
5555

5656
/**
@@ -100,7 +100,7 @@ public void clear() {
100100
* Initialize the child with no labels.
101101
*/
102102
protected void initializeNoLabelsChild() {
103-
// Initlize metric if it has no labels.
103+
// Initialize metric if it has no labels.
104104
if (labelNames.size() == 0) {
105105
noLabelsChild = labels();
106106
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ public List<MetricFamilySamples> collect() {
283283
return mfsList;
284284
}
285285

286+
@Override
286287
public List<MetricFamilySamples> describe() {
287288
List<MetricFamilySamples> mfsList = new ArrayList<MetricFamilySamples>();
288289
mfsList.add(new SummaryMetricFamily(fullname, help, labelNames));

simpleclient_dropwizard/src/main/java/io/prometheus/client/dropwizard/DropwizardExports.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ public List<MetricFamilySamples> collect() {
147147
return mfSamples;
148148
}
149149

150+
@Override
150151
public List<MetricFamilySamples> describe() {
151152
return new ArrayList<MetricFamilySamples>();
152153
}

simpleclient_jetty/src/main/java/io/prometheus/client/jetty/JettyStatisticsCollector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import java.util.List;
1010

1111
/**
12-
* Collect metrics from jettty's org.eclipse.jetty.server.handler.StatisticsHandler.
12+
* Collect metrics from jetty's org.eclipse.jetty.server.handler.StatisticsHandler.
1313
* <p>
1414
* <pre>{@code
1515
* Server server = new Server(0);

simpleclient_pushgateway/src/test/java/io/prometheus/client/exporter/PushGatewayTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import io.prometheus.client.CollectorRegistry;
88
import io.prometheus.client.Gauge;
9-
import java.io.IOException;;
9+
import java.io.IOException;
1010
import java.util.TreeMap;
1111
import java.util.Map;
1212
import org.junit.Assert;

simpleclient_spring_boot/src/main/java/io/prometheus/client/spring/boot/SpringBootMetricsCollector.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public List<MetricFamilySamples> collect() {
4747
return samples;
4848
}
4949

50+
@Override
5051
public List<MetricFamilySamples> describe() {
5152
return new ArrayList<MetricFamilySamples>();
5253
}

0 commit comments

Comments
 (0)