Skip to content

Commit 39a91dd

Browse files
refactor: drop redundant reference check in Labels.isEmpty() (#2440)
1 parent e3dc2e4 commit 39a91dd

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots

‎prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Labels.java‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@ private Labels(String[] names, String[] prometheusNames, String[] values) {
4040
this.values = values;
4141
}
4242

43-
@SuppressWarnings("ReferenceEquality")
4443
public boolean isEmpty() {
45-
return this == EMPTY || this.equals(EMPTY);
44+
return this.equals(EMPTY);
4645
}
4746

4847
/**

0 commit comments

Comments
 (0)