Type
Bug
Priority
High
Component
spin-api
Suggested Labels
bug, lifecycle, shutdown
Affected Files
- spin-api/src/main/java/build/spin/Workspace.java
Summary
If any auto-closeable plugin throws during Workspace.close(), the implementation wraps the exception in a RuntimeException and stops iteration immediately. Remaining plugins are not closed.
Evidence
- The
forEach body throws a RuntimeException from inside shutdown at Workspace.java:61-67.
Impact
One faulty close path can leave the rest of the workspace partially alive. That creates inconsistent teardown, hidden leaks, and brittle test or server shutdown behavior.
Reproduction Inputs
- Add two auto-closeable plugins to a project.
- Make the first plugin throw from
close().
- Make the second plugin record whether its
close() method runs.
- Call
Workspace.close().
Expected Result
Shutdown should attempt to close every closeable extension, then report aggregated failures.
Actual Result
Shutdown stops at the first failure.
Suggested Fix Direction
- Collect close exceptions and continue closing the remaining extensions.
- Re-throw a combined exception after traversal completes.
Required Inputs For Filing
- Severity: High
- User-facing symptom: partial shutdown and leaked follow-on resources
- Code references: Workspace.java:57-68
- Regression risk: medium
Type
Bug
Priority
High
Component
spin-api
Suggested Labels
bug, lifecycle, shutdown
Affected Files
Summary
If any auto-closeable plugin throws during
Workspace.close(), the implementation wraps the exception in aRuntimeExceptionand stops iteration immediately. Remaining plugins are not closed.Evidence
forEachbody throws aRuntimeExceptionfrom inside shutdown atWorkspace.java:61-67.Impact
One faulty close path can leave the rest of the workspace partially alive. That creates inconsistent teardown, hidden leaks, and brittle test or server shutdown behavior.
Reproduction Inputs
close().close()method runs.Workspace.close().Expected Result
Shutdown should attempt to close every closeable extension, then report aggregated failures.
Actual Result
Shutdown stops at the first failure.
Suggested Fix Direction
Required Inputs For Filing