Repository navigation
SONARJAVA-7228 Properly resolve constant chars in string concatenations - #6393
Conversation
asya-vorobeva
left a comment
There was a problem hiding this comment.
Generally LGTM, but should be merged after #6379 with fix of test uncompliant sample.
681d31a to
7e48a55
Compare
Code Review ✅ Approved 1 closed / 1 findings🟡 Medium risk · Resolving character constants in concatenations changes analyzer results across security and collection checks, potentially exposing missed findings or new false positives. Resolves char literals and char constants in string concatenations to their character values, and decodes Unicode escapes before escape processing. Char literals are no longer treated as equal to int constants in the duplicate immutable collection argument check, addressing that finding. No open issues remain. ✅ 1 closed✅ Bug: Char literals now equal int constants in duplicate-element check
Verification Rules 2/2 met Repos 4 inspected · PRs 1 inspectedFunctional validation No results Rules 2 passed 1 not applicable
Broader impact Repos 4 inspected PRs 1 inspectedCross-repo 4 repositories inspected 0 open impacts
Cross-PR 1 PR inspected 0 open impacts
Auto-approval Not enabledFor more verification details, comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
|




Summary by Gitar
ExpressionUtilsLiteralUtils.charLiteralValuePubliclyWritableDirectories,FilePermissionsCheckSample, andWeakSSLContextCheckJava8Set.of('a', 97)is not flagged as duplicate inDuplicateImmutableCollectionArgumentsCheckPreparedStatementAndResultSetCheckSampleas compliant now that the frontend resolves it correctlyThis will update automatically on new commits.