Skip to content

Commit 20d428a

Browse files
committed
add checkstyle
Signed-off-by: Gregor Zeitlinger <[email protected]>
1 parent 0e68be4 commit 20d428a

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
/** Collect Dropwizard metrics from a MetricRegistry. */
3232
public class DropwizardExports implements MultiCollector {
33-
private static final Logger LOGGER = Logger.getLogger(DropwizardExports.class.getName());
33+
private static final Logger logger = Logger.getLogger(DropwizardExports.class.getName());
3434
private final MetricRegistry registry;
3535
private final MetricFilter metricFilter;
3636
private final Optional<CustomLabelMapper> labelMapper;
@@ -109,7 +109,7 @@ MetricSnapshot fromGauge(String dropwizardName, Gauge<?> gauge) {
109109
} else if (obj instanceof Boolean) {
110110
value = ((Boolean) obj) ? 1 : 0;
111111
} else {
112-
LOGGER.log(
112+
logger.log(
113113
Level.FINE,
114114
String.format(
115115
"Invalid type for Gauge %s: %s",

prometheus-metrics-instrumentation-dropwizard5/src/main/java/io/prometheus/metrics/instrumentation/dropwizard5/labels/MapperConfig.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,21 @@ private void validateLabels(final Map<String, String> labels) {
127127

128128
@Override
129129
public boolean equals(final Object o) {
130-
if (this == o) return true;
131-
if (o == null || getClass() != o.getClass()) return false;
130+
if (this == o) {
131+
return true;
132+
}
133+
if (o == null || getClass() != o.getClass()) {
134+
return false;
135+
}
132136

133137
final MapperConfig that = (MapperConfig) o;
134138

135-
if (match != null ? !match.equals(that.match) : that.match != null) return false;
136-
if (name != null ? !name.equals(that.name) : that.name != null) return false;
139+
if (match != null ? !match.equals(that.match) : that.match != null) {
140+
return false;
141+
}
142+
if (name != null ? !name.equals(that.name) : that.name != null) {
143+
return false;
144+
}
137145
return labels != null ? labels.equals(that.labels) : that.labels == null;
138146
}
139147

0 commit comments

Comments
 (0)