LiuBodong opened a new pull request #6207:
URL: https://github.com/apache/dolphinscheduler/pull/6207
## Purpose of the pull request
Fix the bug that StandaloneServer run failed on Windows system.
## Brief change log
* Fix java.nio.file.InvalidPathException in StandaloneServer
The bug's reason is when we call
`Class#getProtectionDomain().getCodeSource().getLocation().getPath()` on
Windows, JAVA will return a path starts with '/', and then we use
`Paths.get(path)` to transform the path, the bug appears.
The solution is use `Paths.get(URL url)` method to transform the path, it
will work correctly.
* Fix bug when use "/target/classes" to judge path will always return false.
The bug's reason is use `File#getPath.endsWith("/target/classes")` to judge
if the given path is compiled class path. On Windows, the delimiter of path is
'\', so the method always returns false.
The solution is use `Paths.endsWith(Path other)` method to judge, it will
work correctly.
<!--Thanks very much for contributing to Apache DolphinScheduler. Please
review
https://dolphinscheduler.apache.org/en-us/community/development/pull-request.html
before opening a pull request.-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]