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

Potential Bug in DataRepository Impacts Data Loading #384

Closed
leewyatt opened this issue Nov 21, 2024 · 4 comments
Closed

Potential Bug in DataRepository Impacts Data Loading #384

leewyatt opened this issue Nov 21, 2024 · 4 comments
Assignees

Comments

@leewyatt
Copy link
Collaborator

leewyatt commented Nov 21, 2024

Hi @FDelporte , Thank you for your efforts in organizing the code in jfxcentral-data. I appreciate the recent updates you made to the DataRepository methods. However, it seems that one of these changes may have introduced a subtle but significant bug. Please see the details below for more information.

Issue Description

After updating from DataRepository2 to DataRepository, a subtle bug affects data loading. It manifests as missing data files and exceptions during operations expecting populated lists.

Steps to Reproduce

  1. Remove the .jfxcentralrepo cache file.
  2. Launch JFXCentral2App (develop). (PR: Change DataRepository2 references to DataRepository jfxcentral2#678 )
  3. Complete data loading and observe console errors indicating missing ...people/people.json. (no such file)
  4. IndexOutOfBoundsException in QuickLinksGenerator due to createShuffledSublist returning an empty list.

Suspected Cause

The refactor might have altered the getRepositoryDirectory method's behavior:

  • When the method is static, the issue does not occur.
  • When non-static, the error surfaces, suggesting a potential linkage or initialization issue with repository path configurations.

Request

Need a review and potential fix of the getRepositoryDirectory method to ensure stable and correct data loading, considering its crucial role in application operations.

FDelporte added a commit that referenced this issue Nov 21, 2024
@FDelporte
Copy link
Collaborator

Thanks for reporting, @leewyatt. I changed this to a static method, and all tests within the data project continue to succeed. It's strange that this error was not revealed by a unit test within the data project itself.

@leewyatt
Copy link
Collaborator Author

Thank you @FDelporte . Did you try reproducing this bug? I also find it quite strange.

@FDelporte
Copy link
Collaborator

No sorry, I wasn't able to reproduce the error in a unittest in the data project

@leewyatt
Copy link
Collaborator Author

Thank you for the update.

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