Skip to content

fix ConfigRegistry copy algorithm #68 #69

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

Merged
merged 1 commit into from
Jun 8, 2025

Conversation

sigpwned
Copy link
Owner

@sigpwned sigpwned commented Jun 8, 2025

No description provided.

@sigpwned sigpwned requested a review from Copilot June 8, 2025 02:14
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug in the ConfigRegistry copy constructor by ensuring that the new registry is properly initialized with a deep copy of the configurations from the original registry.

  • Updates the iteration in the copy constructor to use the original registry's configurations ("that.configs")
  • Ensures that each configuration is deep copied via createCopy() and re-registered to the new registry
Comments suppressed due to low confidence (1)

src/main/java/com/sigpwned/jdbq/config/ConfigRegistry.java:67

  • The updated loop now iterates over 'that.configs.entrySet()', which correctly copies from the original registry. Ensure that the deep copy provided by createCopy() meets all requirements for registered configurations.
for (Map.Entry<Class<? extends JdbqConfig<?>>, JdbqConfig<?>> e : that.configs.entrySet())

@sigpwned sigpwned merged commit a6d6892 into main Jun 8, 2025
1 check passed
@sigpwned sigpwned deleted the bug/68/configregistry-copy-is-broken branch June 8, 2025 02:21
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