Skip to content

fix: prevent StackOverflowError in CollectionHelper #734

Open
ikalachy wants to merge 2 commits into
mainfrom
fix/collection-helper-cycle-detection
Open

fix: prevent StackOverflowError in CollectionHelper #734
ikalachy wants to merge 2 commits into
mainfrom
fix/collection-helper-cycle-detection

Conversation

@ikalachy

Copy link
Copy Markdown
Collaborator

circular references

Add cycle detection using IdentityHashMap to track already-copied objects during recursive deep copy. When a circular reference is encountered, the previously created copy is returned instead of recursing infinitely.

…ular references

Add cycle detection using IdentityHashMap to track already-copied objects
during recursive deep copy. When a circular reference is encountered, the
previously created copy is returned instead of recursing infinitely.
@ikalachy ikalachy requested a review from a team as a code owner June 10, 2026 08:28
carlspring
carlspring previously approved these changes Jun 10, 2026

@carlspring carlspring left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM.

- Add @SuppressWarnings("PMD.GodClass") to CollectionHelper (utility
  class, false positive consistent with 8 existing suppressions)
- Fix EntityModelLoaderTest.getCSNModelTest for Vert.x 5: replace
  .compose() with nested onComplete and use semantic service name
  comparison instead of object equality on independently-parsed
  CdsModel instances
- Add cycle detection test for Set deep copy path
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.

2 participants