Skip to content

Commit 56c68fe

Browse files
committed
format
Signed-off-by: Gregor Zeitlinger <[email protected]>
1 parent af5122f commit 56c68fe

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

checkstyle.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,6 @@
255255
<message key="ws.notPreceded"
256256
value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
257257
</module>
258-
<!-- this doesn't seem to be compatible with google auto-format
259258
<module name="Indentation">
260259
<property name="basicOffset" value="2"/>
261260
<property name="braceAdjustment" value="2"/>
@@ -264,7 +263,6 @@
264263
<property name="lineWrappingIndentation" value="4"/>
265264
<property name="arrayInitIndent" value="2"/>
266265
</module>
267-
-->
268266
<module name="OverloadMethodsDeclarationOrder"/>
269267
<module name="VariableDeclarationUsageDistance"/>
270268
<module name="CustomImportOrder">

prometheus-metrics-instrumentation-dropwizard5/src/main/java/io/prometheus/metrics/instrumentation/dropwizard5/DropwizardExports.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import java.util.Collections;
2525
import java.util.Map;
2626
import java.util.Optional;
27+
import java.util.Set;
2728
import java.util.concurrent.TimeUnit;
2829
import java.util.logging.Level;
2930
import java.util.logging.Logger;
@@ -196,8 +197,9 @@ MetricSnapshot fromMeter(String dropwizardName, Meter meter) {
196197
@Override
197198
public MetricSnapshots collect() {
198199
MetricSnapshots.Builder metricSnapshots = MetricSnapshots.builder();
199-
for (@SuppressWarnings("rawtypes")
200-
Map.Entry<MetricName, Gauge> entry : registry.getGauges(metricFilter).entrySet()) {
200+
@SuppressWarnings("rawtypes")
201+
Set<Map.Entry<MetricName, Gauge>> entries = registry.getGauges(metricFilter).entrySet();
202+
for (@SuppressWarnings("rawtypes") Map.Entry<MetricName, Gauge> entry : entries) {
201203
Optional.ofNullable(fromGauge(entry.getKey().getKey(), entry.getValue()))
202204
.ifPresent(metricSnapshots::metricSnapshot);
203205
}

0 commit comments

Comments
 (0)