-
-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle IllegalStateException in file:directory-list#2
#5092
Conversation
We should consider adding a test for this.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As @line-o suggested, let's add a test...
f578a61
to
76e28c4
Compare
Test added |
63ff6e5
to
c3fd24b
Compare
fixes eXist-db#5028 The Java code of DirectoryList can throw an IllegalStateException when a non-existent directory is supplied as its first argument. This exception class is now handled in file:list#2. Additionally, the raised error now has a proper code `file:DIRECTORY_NOT_FOUND`. This will allow us in the future to add proper error codes to more errors raised by this module.
6.x.x backport is #5093 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 comment otherwise this LGTM.
extensions/modules/file/src/main/java/org/exist/xquery/modules/file/FileErrorCode.java
Outdated
Show resolved
Hide resolved
extensions/modules/file/src/main/java/org/exist/xquery/modules/file/DirectoryList.java
Show resolved
Hide resolved
file:directory-list#2
SonarCloud Quality Gate failed. 0 Bugs 48.6% Coverage Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing the code review, now LGTM.
Thanks everybody! |
Closes #5028
The Java code of DirectoryList can throw an IllegalStateException when a non-existent directory is supplied as its first argument. This exception class is now handled in file:list#2.
This is a forward port of #5061
Thanks to @nverwer for bringing this up and also finding the fix.