Commit 05a92f8
fix(util): use using statement for JAction in Reset_AllowsReuse test (#611)
Fixes CodeQL alert cs/dispose-not-called-on-throw. If Execute(),
Reset(), or Do() threw an exception, Dispose() would not be called.
Using a using declaration ensures the JAction is disposed even if
an exception occurs.
Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>1 parent 9ecdfb8 commit 05a92f8
File tree
1 file changed
+1
-3
lines changed- UnityProject/Packages/com.jasonxudeveloper.jengine.util/Tests/Editor
1 file changed
+1
-3
lines changedLines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
476 | | - | |
| 476 | + | |
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
487 | | - | |
488 | | - | |
489 | 487 | | |
490 | 488 | | |
491 | 489 | | |
| |||
0 commit comments