Skip to content

Conversation

@benzonico
Copy link
Contributor

@benzonico benzonico commented Nov 16, 2025

SONARJAVA-5868

Part of

benzonico and others added 2 commits November 16, 2025 08:47
…erBuilder

The rule was incorrectly raising issues on final fields annotated with
@Builder.Default in classes annotated with @SuperBuilder or @builder.
Lombok's builder pattern requires this exact pattern (final field with
initializer) when using @Builder.Default to provide default values.

Fixed by checking if both conditions are met:
1. Field is annotated with @lombok.Builder.Default
2. Class is annotated with @lombok.Builder or @lombok.experimental.SuperBuilder

When type information is available and both conditions are true, prefer not
raising an issue as this is an intentional Lombok pattern.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@hashicorp-vault-sonar-prod hashicorp-vault-sonar-prod bot changed the title Fix/sonarjava 5796 s1170 superbuilder default fp SONARJAVA-5868 Fix/sonarjava 5796 s1170 superbuilder default fp Nov 16, 2025
@sonarqube-next
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 90%)

See analysis details on SonarQube

@github-actions
Copy link
Contributor

This PR is stale because it has been open 7 days with no activity. If there is no activity in the next 7 days it will be closed automatically

@github-actions github-actions bot added the stale label Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant