-
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
Fix for issue https://github.com/prestodb/presto-maven-plugin/issues/1 #11
Fix for issue https://github.com/prestodb/presto-maven-plugin/issues/1 #11
Conversation
replaced slash by File.separateChar
The PR allows to build Presto on Windows because it fixes the following issue:
|
@wanglinsong Do you think you can help here? |
@@ -119,7 +119,7 @@ private List<Class<?>> findImplementationsOf(Class<?> implementationTemplate, UR | |||
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(File.separatorChar, '.'); |
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.
replaceAll?
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.
@wanglinsong No, replace should be used, because it replaces all occurrences:
public String replace(char oldChar, char newChar)
Returns a string resulting from replacing all occurrences of oldChar in this string with newChar.
while replaceAll works with regular expressions.
But I agree that it's confusing naming.
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.
LGTM
Thanks @wanglinsong @rongrong Do you think you can help us to merge this PR? CC @tdcmeehan |
replaced slash by File.separateChar
CheckerIntegrationTest works under Windows now
#1