diff --git a/snakeyaml/src/test/java/space/arim/dazzleconf/ext/snakeyaml/YamlWriterTest.java b/snakeyaml/src/test/java/space/arim/dazzleconf/ext/snakeyaml/YamlWriterTest.java index f6de629..3e51c34 100644 --- a/snakeyaml/src/test/java/space/arim/dazzleconf/ext/snakeyaml/YamlWriterTest.java +++ b/snakeyaml/src/test/java/space/arim/dazzleconf/ext/snakeyaml/YamlWriterTest.java @@ -59,13 +59,9 @@ private String listIndent() { } private String quoteValue(String value) { - if (writer instanceof CommentedWriter) { - value = "'" + value + "'"; - } - return value; + return (writer instanceof CommentedWriter) ? ("'" + value + "'") : value; } - /** * Provides leniency in case there is an extra new line in {@code actualLines} * @@ -207,7 +203,7 @@ public void writeCommentHeader(YamlWriter.Factory writerFactory) throws IOExcept "# Header 2", "# Comment on entry", "key: " + quoteValue("value")), - resultString.lines().peek(System.out::println)); + resultString.lines()); } private static void assertConfigMapsEqual(Map map1, Map map2) {