-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add Windows path separator support. #7
base: master
Are you sure you want to change the base?
Conversation
With this patch, Presto plugin can be packaged on Windows.
@@ -119,7 +119,7 @@ private URLClassLoader createClassloaderFromCompileTimeDependencies() | |||
List<Class<?>> implementations = Lists.newArrayList(); | |||
List<String> classes = FileUtils.getFileNames(classesDirectory, "**/*.class", null, false); | |||
for (String classPath : classes) { | |||
String className = classPath.substring(0, classPath.length() - 6).replace('/', '.'); | |||
String className = classPath.substring(0, classPath.length() - 6).replace('/', '.').replace('\\', '.'); |
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.
Wouldn't it make it more sense, instead of adding another replace to change the existing one into
.replace(File.separatorChar, '.')
which would work on any operating system?
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.
Look my pull request #11
i have run into the problem when compiling presto, see prestodb/presto#11818 I think this PR will solve the problem, anyone can merge this?? |
Can anyone merge this? |
The PR allows to build Presto on Windows because it fixes the following issue:
|
With this patch, Presto plugin can be packaged on Windows.