Skip to content

JAVA-7333 Fix the handling of record constructors when computing the last token of a signature - #6544

Merged
aurelien-coet-sonarsource merged 1 commit into
masterfrom
ac/JAVA-7333
Nov 24, 2026
Merged

aurelien-coet-sonarsource merged 1 commit into
masterfrom
ac/JAVA-7333

Conversation

@aurelien-coet-sonarsource

@aurelien-coet-sonarsource aurelien-coet-sonarsource commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary by Gitar

  • Fixed bugs:
    • Record close parenthesis is now checked before type parameters in LeftCurlyBraceBaseTreeVisitor, fixing generic records
  • Tests:
    • Added generic record, empty component, and implements-clause cases to LeftCurlyBraceStartLineCheck_java17 and LeftCurlyBraceEndLineCheck_record

This will update automatically on new commits.

@gitar-bot

gitar-bot Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk

Moving the record closing-parenthesis check ahead of type parameters changes brace-location analysis for generic records, which could produce incorrect placement findings.

Fixes handling of record constructors when computing the last token of a signature by checking the record close parenthesis before type parameters in LeftCurlyBraceBaseTreeVisitor, which corrects generic records. Added test cases cover generic records, empty components, and implements clauses. No issues found.

Verification Rules 2/2 met Repos 3 inspected

Functional validation No results

Rules 2 passed 2 not applicable

✅ Internal artifact registries
✅ Repository license compliance

Broader impact Repos 3 inspected
Cross-repo 3 repositories inspected 0 open impacts

SonarSource/sonar-iac Inspected
SonarSource/sonarlint-vscode Inspected
SonarSource/sonar-lits Inspected

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@hashicorp-vault-sonar-prod

hashicorp-vault-sonar-prod Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

JAVA-7333

@sonarqube-next

Copy link
Copy Markdown
Contributor

@rombirli

Copy link
Copy Markdown
Contributor

/pvf

@rombirli rombirli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@hashicorp-vault-sonar-prod

Copy link
Copy Markdown
Contributor

⚠️ Performance Validation finished without publishing a dashboard. See run logs.

@hashicorp-vault-sonar-prod

Copy link
Copy Markdown
Contributor

📊 Performance Validation complete
🆕 51 new · 🗑️ 5 lost issues
View dashboard

@aurelien-coet-sonarsource
aurelien-coet-sonarsource merged commit 8b80f1c into master Nov 24, 2026
21 checks passed
@aurelien-coet-sonarsource
aurelien-coet-sonarsource deleted the ac/JAVA-7333 branch November 24, 2026 13:22
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