Don't throw exception when validating invalid paths#8112
Merged
Conversation
Siedlerchr
approved these changes
Oct 2, 2021
Siedlerchr
left a comment
Member
There was a problem hiding this comment.
thanks for your contribution, I guess this is fine in this case!
Member
|
Looks good to me. Thanks. Merging now! |
Siedlerchr
added a commit
that referenced
this pull request
Oct 4, 2021
* upstream/main: Don't throw exception when validating invalid paths (#8112) Bump jackson-dataformat-yaml from 2.12.5 to 2.13.0 Bump jackson-datatype-jsr310 from 2.12.5 to 2.13.0 Bump byte-buddy-parent from 1.11.15 to 1.11.18 Bump classgraph from 4.8.116 to 4.8.121 Bump checkstyle from 9.0 to 9.0.1 remove iso charset, website returns utf8 for icar comp sci only returns one result fix springer fetcher Fix computer science fetcher Squashed 'buildres/csl/csl-locales/' changes from 7a507fc008..495f888637 Squashed 'buildres/csl/csl-styles/' changes from 5facb37..3b00357 Update CHANGELOG.md snap: Use lzo compression & switch to core20 base
Siedlerchr
added a commit
that referenced
this pull request
Oct 10, 2021
* upstream/main: (149 commits) Add Tutorials for javafx lint Add changelot Open folder on mac and highlight file Add Tests to DoiCleanup (#8124) Improve Drag and Drop in Custom Entry types dialog (#8121) Show preview also for available styles (#8110) udpate to javafx 17.0.0.1 Don't throw exception when validating invalid paths (#8112) Bump jackson-dataformat-yaml from 2.12.5 to 2.13.0 Bump jackson-datatype-jsr310 from 2.12.5 to 2.13.0 Bump byte-buddy-parent from 1.11.15 to 1.11.18 Bump classgraph from 4.8.116 to 4.8.121 Bump checkstyle from 9.0 to 9.0.1 remove iso charset, website returns utf8 for icar comp sci only returns one result fix springer fetcher Fix computer science fetcher Squashed 'buildres/csl/csl-locales/' changes from 7a507fc008..495f888637 Squashed 'buildres/csl/csl-styles/' changes from 5facb37..3b00357 Update CHANGELOG.md snap: Use lzo compression & switch to core20 base ...
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.
Fixes #8107
While usually I don't advocate silently catching exceptions, in this case I think it's the right thing to do as we just want a true / false value as to whether the path is valid or not. If we catch an
InvalidPathExceptionthen we always know that the path is invalid - so this fixes the attached issue with UNC paths, as well as any other theoretical invalid path that might throw this exception.CHANGELOG.mddescribed in a way that is understandable for the average user (if applicable)