Repository navigation
SONARJAVA-7284 Introduce frontend sessions and deterministic resource ownership - #6451
aurelien-coet-sonarsource wants to merge 3 commits into
Conversation
d870196 to
b07e3d4
Compare
b07e3d4 to
d5e9f9f
Compare
|
/pvf |
d5e9f9f to
847e881
Compare
|
📊 Performance Validation complete Projects with unexpected PVF results:
|
dafe3cb to
2edd634
Compare
Code Review ✅ Approved 1 closed / 1 findings🟡 Medium risk · Refactoring parser sessions and cleanup across Java analysis could release ECJ environments too early or disrupt semantic resolution during scanning. Introduces frontend sessions and deterministic resource ownership for the ECJ parser lifecycle, with try-with-resources release of environments and a ✅ 1 closed✅ Edge Case: Static JUtilsTest.SEMA is retained in whichever class scope loads it
Verification Rules 2/2 met PRs 2 inspectedFunctional validation No results Rules 2 passed 1 not applicable
Broader impact PRs 2 inspectedCross-PR 2 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 |
|




Summary by Gitar
FrontendSession,FrontendBackend, andFrontendParserto own the ECJ parser lifecycle, replacing directASTParseruse inJParserConfigFrontendBatch,FrontendConfiguration, andEcjFrontendBackendfor batch inputs and parser setupFrontendResourcesto run environment cleaners in order, attempt every cleanup, and preserve the primary failureJavaFrontendandJavaAstScannernow release environments through try-with-resourcesJSemacaches its environment cleaner so repeated cleanup runs onceTestResourceScopewith a@Scopedannotation to keep parser fixtures alive through assertionsSemanticFixtureand migrated many semantic tests andJParserTestUtilshelpers to use itProgressMonitornow implements onlyRunnable, dropping itsIProgressMonitorcontractThis will update automatically on new commits.