Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Label does not implement .equals() and .hashCode() #890

Open
dhoard opened this issue Nov 3, 2023 · 0 comments
Open

Label does not implement .equals() and .hashCode() #890

dhoard opened this issue Nov 3, 2023 · 0 comments
Assignees

Comments

@dhoard
Copy link
Collaborator

dhoard commented Nov 3, 2023

Issue

Label implements Comparable but it doesn't implement .equals(Object o) and .hashCode().

Code

https://github.com/prometheus/client_java/blob/main/prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Label.java

Test

Label label1 = new Label("foo", "bar");
Label label2 = new Label("foo", "bar");
assertTrue(label1.equals(label2));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants