Repository navigation
Conversation
2c894b0 to
b7c0217
Compare
fdaf06a to
640c98d
Compare
640c98d to
a131d61
Compare
a131d61 to
2a1e795
Compare
2a1e795 to
83ad75a
Compare
The server now names the type of an array parameter, result or field with an array term, java::byte[], instead of the written byte[]. Read the element of the term so these types keep the name of the array the code declares; a hashed term spells no element and stays unknown.
83ad75a to
eadab5a
Compare
Code Review ✅ Approved 🟡 Medium riskResolving SemSitter array terms as element arrays changes Java type matching; incorrect resolution could misidentify overridden methods and affect related analysis results. Teaches Verification Rules 3/3 met Repos 4 inspected · PRs 4 inspectedFunctional validation No results Rules 3 passed 2 not applicable
Broader impact Repos 4 inspected PRs 4 inspectedCross-repo 4 repositories inspected 0 open impacts
Cross-PR 4 PRs 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 |
|
david-schroeter
left a comment
There was a problem hiding this comment.
LGTM! One question about HASHED_TERM: I couldn’t reproduce a hashed type ID locally. When does the SemSitter server emit one?




Part 5 of 17 of JAVA-7392. Ticket: JAVA-7419.
Intent
Since SonarSource/semsitter#5876 and #5950, the server names array types with a term id spelled over their element,
java::byte[], instead of a plainbyte[].FactTypesread such a term as a class literally namedjava::byte[], with no element, so no signature with an array parameter matched its overridden method.flowchart LR T["java::byte[][]"] --> A["array of"] --> B["java::byte[]"] --> C["array of"] --> P["byte"] H["java::{a1b2}"] --> U["unknown"]A hashed term,
java::{...}, spells no element and stays unknown.RedissonConnection.exists(byte[])java::byte[]byte[]DefaultedRedisConnection(deprecated),RedisKeyCommandsThis explains part of the issues lost on the last PVF compared to the earlier stack.
State on master
FactTypesdoes not exist on master: it comes with part 4.Test plan
FactTypesTest.array_terms_are_the_arrays_of_their_element:java::byte[],java::int[][], generic and type variable elements, hashed terms stay unknown