You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/09/01 16:43:45 UTC

[GitHub] [shardingsphere] SteNicholas commented on a change in pull request #12161: Fix the separator problem under window.

SteNicholas commented on a change in pull request #12161:
URL: https://github.com/apache/shardingsphere/pull/12161#discussion_r700388625



##########
File path: shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/persist/service/impl/DataSourcePersistServiceTest.java
##########
@@ -61,7 +61,7 @@ public void assertLoad() {
     @SneakyThrows({IOException.class, URISyntaxException.class})
     private String readDataSourceYaml(final String path) {
         return Files.readAllLines(Paths.get(ClassLoader.getSystemResource(path).toURI()))
-                .stream().filter(each -> StringUtils.isNotBlank(each) && !each.startsWith("#")).map(each -> each + System.lineSeparator()).collect(Collectors.joining());
+                .stream().filter(each -> StringUtils.isNotBlank(each) && !each.startsWith("#")).map(each -> each + "\n").collect(Collectors.joining());

Review comment:
       It shouldn't be fixed here. `System.lineSeparator()` does return the line separator, it will return the corresponding line separator according to the current computer system. Or you could try to use the `System.getProperty("line.separator")`.




-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org