in edas-demo/config-demo/apollo-migration/src/main/java/com/alibabacloud/edas/tool/model/ConfigPathList.java [160:180]
private String resolveContent() {
return paths.stream().sorted().map((x) -> {
try {
byte[] bytes = Files.readAllBytes(x);
if (bytes == null || bytes.length == 0) {
return null;
}
noneEmptyPaths.add(x);
return "\r\n#" +
"\r\n# Original file: " + x.toString() +
"\r\n#" +
"\r\n" +
new String(bytes, "utf-8");
} catch (IOException e) {
System.err.println("Reading content error: " +e.getMessage());
return null;
}
}).filter(c -> c != null).collect(Collectors.joining("\r\n"));
}