Commit 4be171ae authored by 王品堯's avatar 王品堯

format, 簡化log資訊

parent 37e468dc
......@@ -30,7 +30,8 @@ public class JsonFileCompare {
}
}
private static void addKeys(String currentPath, JsonNode jsonNode, Set<String> set, List<Integer> suffix) {
private static void addKeys(
String currentPath, JsonNode jsonNode, Set<String> set, List<Integer> suffix) {
if (jsonNode.isObject()) {
ObjectNode objectNode = (ObjectNode) jsonNode;
Iterator<Map.Entry<String, JsonNode>> iter = objectNode.fields();
......@@ -66,7 +67,10 @@ public class JsonFileCompare {
.filter(key -> !targetSet.contains(key))
.collect(Collectors.toSet());
if (!missingKey.isEmpty()) {
log.error("Missing Key on {} \n Missing Keys: {}", targetPath, missingKey.stream().sorted().collect(Collectors.toList()));
log.error(
"Missing Key on {} \nMissing Keys: {}",
targetPath.getFileName(),
missingKey.stream().sorted().collect(Collectors.toList()));
System.exit(1);
}
} catch (Exception e) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment