Repository navigation
Conversation
431d444 to
8f917d7
Compare
5aa9bfb to
874f07d
Compare
…ed fields When the enclosing class has a supertype the server cannot read, it leaves the names a static import brings in unresolved. Look the name up as a field of the enclosing types first, since a declared or inherited field shadows a static import, then as a static field of the single static import, then of each static import on demand, as ECJ does.
874f07d to
53294f6
Compare
CI failed: The ruling update job failed because the upstream ruling-qa job was cancelled, so no actual_* artifacts were available to download. The log does not establish why QA was cancelled, and the analyzer attributes this to infrastructure unrelated to the PR's SemSitter name-binding change.OverviewThe ruling update job failed because the upstream ruling-qa job was cancelled, so no actual_* artifacts were available to download. The log does not establish why QA was cancelled, and the analyzer attributes this to infrastructure unrelated to the PR's SemSitter name-binding change. FailuresRuling update failed: no actual_* artifacts due to cancelled upstream ruling QA job
Summary
Code Review ✅ Approved 🟡 Medium risk 1 closed / 1 findingsResolving previously unknown names to enclosing or statically imported fields changes semantic analysis and could alter findings for affected references. Binds unresolved names to statically imported fields, following ECJ's order: enclosing-type fields first, then the single static import, then on-demand imports. The previously open finding that the static-import fallback skipped fields of enclosing types has been resolved. ✅ 1 closed✅ Bug: Static-import field fallback skips fields of enclosing types
Verification Rules 3/3 met Repos 3 inspected · PRs 4 inspectedFunctional validation No results Rules 3 passed 2 not applicable
Broader impact Repos 3 inspected PRs 4 inspectedCross-repo 3 repositories inspected 0 open impacts
Cross-PR 4 PRs inspected 0 open impacts
Auto-approval Not enabledFor more verification details, comment Tip 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 |
|




Part 8 of 17 of JAVA-7392. Ticket: JAVA-7420.
Intent
When a file's batch only knows a supertype as a compiled class, the server can leave a statically imported field unresolved. The translator then made it an unknown symbol, which broke every check that follows the field.
The translator now binds such a name as ECJ does: to a field of the enclosing types first, since a declared or inherited field shadows a static import, then to the static field of the single static import, then of each on demand import.
flowchart LR N["unresolved name"] --> T{"field of an enclosing type?"} T -->|found| B["bind and ascribe the field"] T -->|no| S{"single static import?"} S -->|field found| B["bind and ascribe the field"] S -->|no| D{"on demand imports?"} D -->|static field found| B D -->|no| U["stays unknown"]DERBYSQLDialect.DERBY, deprecatedThis explains the other part of the issues lost on the last PVF compared to the earlier stack.
State on master
NameTranslatordoes not exist on master: it comes with part 7.Test plan
NameTranslatorTest.an_unresolved_name_is_the_field_a_static_import_brings_in:PI,EandSECONDSbind to their fields, an unimported name stays unknownNameTranslatorTest.an_unresolved_name_is_the_field_of_its_enclosing_type_first: an unresolvedcountbinds to the field of its class