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

HashMap usage logic in UpgradeTracker #143

Open
abrbird opened this issue Jun 28, 2024 · 3 comments
Open

HashMap usage logic in UpgradeTracker #143

abrbird opened this issue Jun 28, 2024 · 3 comments

Comments

@abrbird
Copy link

abrbird commented Jun 28, 2024

Does the logic in the UpgradeTracker class work correctly with the use of String[] as a key, or should a different key type be used, such as List<String>? As I know hashCode for String[] returns a value based on the object's reference rather than the array's content.

private final Map<String[], PerTypeLabelStats> upgradeTracker = new HashMap<>(1);

@fsatka
Copy link

fsatka commented Sep 3, 2024

anybody can answer on question, please)

@spolti
Copy link
Contributor

spolti commented Sep 11, 2024

@ckadner do you know this part of the code base?

@spolti
Copy link
Contributor

spolti commented Sep 11, 2024

I am not sure if it makes sense since it is a fixed hashmap.
String[] is fine in this case.
did you find any issue?

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

3 participants