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

Fix InvalidPathException issue on Windows in FileUtils::findDirs #29

Merged
merged 2 commits into from
May 31, 2023

Conversation

neilcsmith-net
Copy link
Member

FileUtils::findDirs is breaking on Windows as it's using Path to calculate the max path depth for the passed in glob patterns, and * is not supported in a Windows path. Switches to using String::split.

First commit adds a workflow matrix to build and run unit tests on Linux, Windows and macOS.

Fixes #28

…Util::findDirs

Using Path is OS specific, and Windows doesn't support use of glob wilcard *
in paths. Instead, do String::split on /. Also update documentation in line
with the requirements.
Copy link
Member

@mbien mbien left a comment

Choose a reason for hiding this comment

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

makes sense to me

interesting issue

Copy link
Contributor

@ebarboni ebarboni left a comment

Choose a reason for hiding this comment

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

looks ok to me. on the ci site jenkins I will change the java matrix to put jdk 21. (on jenkins it's only test linux)

@neilcsmith-net
Copy link
Member Author

Thanks @ebarboni Is the Jenkins JDK the JDK that builds snapshots? Should keep 11 for main build.

@neilcsmith-net
Copy link
Member Author

interesting issue

Or stupid programmer! 😆 Given how many other things in this were written to be careful of cross-OS issues, this was a daft mistake. I intend to do a bit more Windows testing before we release beta3.

Thanks @mbien

@ebarboni
Copy link
Contributor

Thanks @ebarboni Is the Jenkins JDK the JDK that builds snapshots? Should keep 11 for main build.

jdk8 build snapshot for default Apache Maven NetBeans related but for nbpackage the jdk is jdk11. overrided in the Jenkins.groovy file.

@neilcsmith-net neilcsmith-net merged commit 7110ddd into apache:master May 31, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

InvalidPathException in FileUtils.findDirs()
3 participants