Skip to content

chore(spawn-jdk): make ClassPathTests robust when JVM is launched on module path only#17

Merged
deer merged 1 commit intomainfrom
improved_classpath_test
Apr 15, 2026
Merged

chore(spawn-jdk): make ClassPathTests robust when JVM is launched on module path only#17
deer merged 1 commit intomainfrom
improved_classpath_test

Conversation

@deer
Copy link
Copy Markdown
Collaborator

@deer deer commented Apr 15, 2026

shouldCreateSystemClassPath previously assumed java.class.path is always non-empty, causing it to fail when the JVM is launched purely on the module path (e.g. under spin). The test now reads java.class.path and branches: asserts empty when the system property is empty, otherwise applies the existing non-empty checks.

shouldTreatClassPathAsAPathSet had the same fragility — it sourced test paths from ClassPath.inherited(), which throws if the inherited classpath is empty. Replaced with user.home, a stable path that's always present.

@deer deer merged commit 204298f into main Apr 15, 2026
1 check passed
@deer deer deleted the improved_classpath_test branch April 15, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant