kyoty commented on a change in pull request #5676:
URL: https://github.com/apache/dolphinscheduler/pull/5676#discussion_r656161469



##########
File path: 
dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/plugin/DolphinPluginDiscovery.java
##########
@@ -83,6 +83,7 @@ private DolphinPluginDiscovery() {
 
         return listClasses(file.toPath()).stream()
                 .filter(name -> classInterfaces(name, 
classLoader).contains(DolphinSchedulerPlugin.class.getName()))
+                .map(plugin -> plugin.replace(File.separatorChar, '.'))

Review comment:
       @ruanwenjun thanks, I submit it again. 
   + This class contains both conversations from '/' to '.' and from '\\' to '.'
   + it's a little tricky: classPaths(in `classInterfaces`) are 
platform-independent(always '/'), and  paths like filePath  are  
platform-dependent(windows: '\\' unix-like:  '/'), so the` javaName` method 
would be better to have the ablity to deal with both '/' and '\\'.




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to