Skip to content
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

Normalizes the URL created from paths in LibSVMDataSource #181

Merged
merged 2 commits into from
Oct 5, 2021

Conversation

Craigacp
Copy link
Member

@Craigacp Craigacp commented Oct 5, 2021

Description

This change normalizes the path before it is converted into a URL in LibSVMDataSource. Adds a test for the fixed behaviour.

Motivation

LibSVMDataSource.postConfig checks to see if the URL and path are the same before throwing an exception if both are set. The FileProvenance constructor normalizes and absolutes the path before it is created, however the original codepath in LibSVMDataSource did not do this to the URL which is created. This means if the path has a relative element in it like . or .. then the URL created retains the relative element and the path has it normalized out, meaning the two values are not equal and an exception is thrown when the configuration is instantiated from the provenance of a LibSVMDataSource.

@Craigacp Craigacp requested a review from JackSullivan October 5, 2021 03:03
@Craigacp Craigacp added Oracle employee This PR is from an Oracle employee squash-commits Squash the commits when merging this PR labels Oct 5, 2021
Copy link
Member

@JackSullivan JackSullivan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@Craigacp Craigacp merged commit 9596cac into main Oct 5, 2021
@Craigacp Craigacp deleted the libsvmdatasource-provenance-fix branch October 5, 2021 15:24
Craigacp added a commit that referenced this pull request Dec 9, 2021
* Normalizing the URL created from paths in LibSVMDataSource to deal with relative path issues in round-tripping the provenance.

* More normalization for LibSVMDataSource's paths.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Oracle employee This PR is from an Oracle employee squash-commits Squash the commits when merging this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants