summaryrefslogtreecommitdiffstats
path: root/abi-check-plugin
diff options
context:
space:
mode:
authorjonmv <venstad@gmail.com>2022-10-25 13:03:57 +0200
committerjonmv <venstad@gmail.com>2022-10-25 13:03:57 +0200
commit8260df6d0038f833f2222a3cd3a81eb6c0e9d613 (patch)
tree1994180980804c07f0934e5bcfdfc0a6161b023b /abi-check-plugin
parent70026cc89de5a1586f7b70e261d0f09c437a2263 (diff)
Update ABI spec format, and update all specs
Diffstat (limited to 'abi-check-plugin')
-rw-r--r--abi-check-plugin/src/main/java/com/yahoo/abicheck/mojo/AbiCheck.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/abi-check-plugin/src/main/java/com/yahoo/abicheck/mojo/AbiCheck.java b/abi-check-plugin/src/main/java/com/yahoo/abicheck/mojo/AbiCheck.java
index c064bb5d918..1f22383db38 100644
--- a/abi-check-plugin/src/main/java/com/yahoo/abicheck/mojo/AbiCheck.java
+++ b/abi-check-plugin/src/main/java/com/yahoo/abicheck/mojo/AbiCheck.java
@@ -1,8 +1,11 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.abicheck.mojo;
+import com.fasterxml.jackson.core.util.DefaultIndenter;
+import com.fasterxml.jackson.core.util.DefaultPrettyPrinter;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
import com.yahoo.abicheck.classtree.ClassFileTree;
import com.yahoo.abicheck.classtree.ClassFileTree.ClassFile;
import com.yahoo.abicheck.classtree.ClassFileTree.Package;
@@ -76,7 +79,8 @@ public class AbiCheck extends AbstractMojo {
private static void writeSpec(Map<String, JavaClassSignature> signatures, File file)
throws IOException {
try (FileWriter writer = new FileWriter(file)) {
- new ObjectMapper().writeValue(writer, signatures);
+ new ObjectMapper().writer(new DefaultPrettyPrinter().withArrayIndenter(DefaultIndenter.SYSTEM_LINEFEED_INSTANCE))
+ .writeValue(writer, signatures);
}
}
// CLOVER:ON