Repository navigation
Keep build() from throwing on an unconvertible plugins path - #8
Merged
Merged
Conversation
File.toPath() ran outside the try in readServerWideConfig, so a path the file system cannot represent (a NUL in the name) let an InvalidPathException escape build(), which promises never to throw. It is now converted inside the try and treated like any other IO failure: logged at FINE, counted as enabled. Closes #7 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (anchored on CI run 36979371739, where
Observations:
This review was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
readServerWideConfigcalledFile.toPath()outside itstry. A plugins path the file system cannot represent (e.g. a NUL in the name) therefore letInvalidPathExceptionescapebuild(), which is documented as "Never throws". The conversion has been moved inside the existingcatch (IOException | RuntimeException), so such a path is now logged atFINEand treated as enabled, like every other server-wide IO failure.serverWideConfig_aPathThatCannotBeConvertedIsLoggedFineAndTreatedAsEnabled.FINEand counts as enabled") already describes the fixed behaviour.Closes #7
Test plan
mvn -B verifyrun locally on Java 21: 47 tests, 0 failuresInvalidPathExceptionescapedbuild()) and to PASS after itTriage notes
No other issues were open at triage, so none were deferred. No version bump was made; that is left to the maintainer.
This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
🤖 Generated with Claude Code
drafted by Claude on behalf of Daniel Stephenson