Skip to content

Conversation

@TheRettom
Copy link

fix(model): Resolve StackOverflowError in CompanySettings/GeneralPreferences toString()

A java.lang.StackOverflowError was occurring during the processing (likely serialization or logging) of CompanySettings and GeneralPreferences objects. The issue was identified as an infinite recursion between their respective 'toString()' methods.

This recursion stemmed from Lombok's @DaTa annotation, which automatically generates toString() methods that attempt to include all fields. Since CompanySettings references GeneralPreferences, and GeneralPreferences (inferred) references CompanySettings, their toString() calls would loop endlessly.

This commit resolves the issue by adding @ToString.Exclude to the fields causing the circular dependency:

  • 'generalPreferences' field in CompanySettings.java
  • (Assuming) 'companySettings' field in GeneralPreferences.java

This change prevents the problematic fields from being included in the generated toString() output, thereby breaking the recursive call chain and eliminating the StackOverflowError.

fix(model): Resolve StackOverflowError in CompanySettings/GeneralPreferences toString()

A java.lang.StackOverflowError was occurring during the processing (likely serialization or logging) of CompanySettings and GeneralPreferences objects. The issue was identified as an infinite recursion between their respective 'toString()' methods.

This recursion stemmed from Lombok's @DaTa annotation, which automatically generates toString() methods that attempt to include all fields. Since CompanySettings references GeneralPreferences, and GeneralPreferences (inferred) references CompanySettings, their toString() calls would loop endlessly.

This commit resolves the issue by adding @ToString.Exclude to the fields causing the circular dependency:
- 'generalPreferences' field in CompanySettings.java
- (Assuming) 'companySettings' field in GeneralPreferences.java

This change prevents the problematic fields from being included in the generated toString() output, thereby breaking the recursive call chain and eliminating the StackOverflowError.
@netlify
Copy link

netlify bot commented Jun 12, 2025

👷 Deploy request for jade-gingersnap-11da58 pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 099d1cc

@TheRettom
Copy link
Author

Any update on this?

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