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

MH-13412, Deprecate PathSupport.concat(…) #754

Merged

Conversation

lkiesow
Copy link
Member

@lkiesow lkiesow commented Mar 2, 2019

Most of Opencast's PathSupport class are re-implementations of of
functionality built into Java's standard library and it would make much
more sense to use the standard library instead.

This patch deprecates a number of PathSupprt methods, describing the
alternatives from the standard library.

Most of Opencast's PathSupport class are re-implementations of of
functionality built into Java's standard library and it would make much
more sense to use the standard library instead.

This patch deprecates a number of PathSupprt methods, describing the
alternatives from the standard library.
@lkiesow lkiesow added enhancement maintenance This pull request is addressing maintenance issues labels Mar 2, 2019
@gregorydlogan gregorydlogan self-assigned this Mar 3, 2019
@gregorydlogan
Copy link
Member

I'm 90% certain I was just advising @rute-santos to use these methods, sooo... I'll take this PR :-)

@lkiesow
Copy link
Member Author

lkiesow commented Mar 3, 2019

Happy to have a reviewer ;-)

I was just advising @rute-santos to use these methods

Any particular reason for using PathSupport over the built-ins? Pull request #755 contains an example for switching to the built-ins:

- File configFile = new File(PathSupport.concat(new String[] { uiConfigFolder, orgId, component, filename }));
+ File configFile = Paths.get(uiConfigFolder, orgId, component, filename).toFile();

Not only do I think that it is actually simpler to use but I'm also all for having less custom code.

@gregorydlogan
Copy link
Member

Apologies, I was thinking of UrlSupport.concat, not PathSupport. I'm all for reducing custom code in favour of built-ins.

@gregorydlogan gregorydlogan merged commit 15a0aae into opencast:develop Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement maintenance This pull request is addressing maintenance issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants