Skip to content

Commit 45ba126

Browse files
committed
simplify matchesValue
1 parent 34b3ab3 commit 45ba126

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ public String toString() {
5757
* @return true if this matcher is matching provided value, false otherwise.
5858
*/
5959
boolean matchesValue(String value) {
60-
if (attributeValue == null) {
61-
return true;
62-
}
63-
return Objects.equals(attributeValue, value);
60+
return attributeValue == null || attributeValue.equals(value);
6461
}
6562
}

0 commit comments

Comments
 (0)