Commit 8ed60f5
authored
fix(intelligence): close ExecutorService via try-with-resources (SonarCloud S2095) (#54)
The virtual-thread executor was shut down in a finally block, which is
architecturally correct but triggers SonarCloud's S2095 blocker bug.
Java 19+ ExecutorService implements AutoCloseable; try-with-resources
invokes close() which safely shuts down and awaits termination.
Each future.get() already has a 5-minute timeout + cancel, so by the
time close() runs, tasks are terminal and close() returns promptly.
The manual 10s+5s shutdown timing is superseded by AutoCloseable
contract.1 parent 046ea70 commit 8ed60f5
1 file changed
Lines changed: 4 additions & 15 deletions
Lines changed: 4 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
126 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
127 | 129 | | |
128 | 130 | | |
129 | 131 | | |
| |||
183 | 185 | | |
184 | 186 | | |
185 | 187 | | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | 188 | | |
200 | 189 | | |
201 | 190 | | |
| |||
0 commit comments