Skip to content

fix(ui): select a predictable first table on startup #118

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

valters
Copy link

@valters valters commented Mar 19, 2025

previously map.values.iterator.next was selecting a random table

previously map.values.iterator.next was selecting a random table
@@ -198,7 +198,7 @@ public boolean equals(Object obj) {
public ExtractionModel(DataModel dataModel, ExecutionContext executionContext) {
this.dataModel = dataModel;
this.version = null;
subject = dataModel.getTables().iterator().hasNext()? dataModel.getTables().iterator().next() : null;
Copy link
Author

@valters valters Mar 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HashMap.values().iterator() happens to select some entry that happens to have first hash value: I think it's not great that on startup the focus table is essentially randomly selected.

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

Successfully merging this pull request may close these issues.

1 participant