Skip to content

Commit 34b3ab3

Browse files
committed
reformat & cleanup
1 parent 59a7dfc commit 34b3ab3

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

jmx-scraper/src/integrationTest/java/io/opentelemetry/contrib/jmxscraper/assertions/AttributeMatcherSet.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,14 @@ public class AttributeMatcherSet {
2626
matchers.stream().collect(Collectors.toMap(AttributeMatcher::getAttributeName, m -> m));
2727
}
2828

29-
Map<String, AttributeMatcher> getMatchers() {
30-
return matchers;
31-
}
32-
3329
/**
3430
* Checks if attributes match this attribute matcher set
3531
*
3632
* @param attributes attributes to check as map
3733
* @return {@literal true} when the attributes match all attributes from this set
3834
*/
3935
public boolean matches(Map<String, String> attributes) {
40-
if(attributes.size() != matchers.size()) {
36+
if (attributes.size() != matchers.size()) {
4137
return false;
4238
}
4339

jmx-scraper/src/integrationTest/java/io/opentelemetry/contrib/jmxscraper/assertions/MetricAssert.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,10 @@ public final MetricAssert hasDataPointsWithAttributes(AttributeMatcherSet... att
264264

265265
// validate each datapoint attributes match exactly one of the provided attributes sets
266266
for (NumberDataPoint dataPoint : dataPoints) {
267-
Map<String, String> dataPointAttributes = dataPoint.getAttributesList().stream()
268-
.collect(Collectors.toMap(KeyValue::getKey, kv -> kv.getValue().getStringValue()));
267+
Map<String, String> dataPointAttributes =
268+
dataPoint.getAttributesList().stream()
269+
.collect(
270+
Collectors.toMap(KeyValue::getKey, kv -> kv.getValue().getStringValue()));
269271
int matchCount = 0;
270272
for (int i = 0; i < attributeMatchers.length; i++) {
271273
if (attributeMatchers[i].matches(dataPointAttributes)) {
@@ -289,5 +291,4 @@ public final MetricAssert hasDataPointsWithAttributes(AttributeMatcherSet... att
289291
}
290292
});
291293
}
292-
293294
}

0 commit comments

Comments
 (0)