-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
When there is no uri validation, do not validate the scheme #384
Conversation
Thanks for the PR! Would it be possible to simply deprecate the |
The PR is updated, introducing the policy as requested. |
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.
I would like to bump the version to 1.5.0-SNAPSHOT before merging, but it seems I can't directly edit this PR to include the updated pom files.
if (uri == null | ||
|| uri.length() < 3 // minimal form s(1):ssp(1) | ||
public static final boolean isAbsoluteUri(final String uri, final UriValidationPolicy policy) { | ||
boolean result = false; |
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.
The validation status could be returned directly, i.e., by returning true or false without assigning the result to a variable. However, I'm not going to block this PR because of it.
* Method allowing to convert the legacy boolean to the matching policy | ||
*/ | ||
public static UriValidationPolicy of(boolean value) { | ||
if(value) |
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.
To align with the code conventions used in the rest of the codebase, please use {}
or the inline construct return _ ? _ : _ ;
. Thank you!
I addressed the feedbacks, thanks for the help :) |
Fixes #383
The
RdfDataset
contains the invalid uri even if the scheme is wrong/missing if uri validation is disabled.