Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion yaml/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.19</version>
<version>1.21</version>
</dependency>

<!-- and for testing need annotations -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import org.yaml.snakeyaml.DumperOptions;
import org.yaml.snakeyaml.DumperOptions.FlowStyle;
import org.yaml.snakeyaml.DumperOptions.ScalarStyle;
import org.yaml.snakeyaml.emitter.Emitter;
import org.yaml.snakeyaml.events.*;
import org.yaml.snakeyaml.nodes.Tag;
Expand Down Expand Up @@ -173,7 +174,7 @@ private Feature(boolean defaultState) {

// Which flow style to use for Base64? Maybe basic quoted?
// 29-Nov-2017, tatu: Actually SnakeYAML uses block style so:
private final static Character STYLE_BASE64 = STYLE_LITERAL;
private final static ScalarStyle STYLE_BASE64 = ScalarStyle.createStyle(STYLE_LITERAL);

private final static Character STYLE_PLAIN = null;

Expand Down Expand Up @@ -428,7 +429,7 @@ public final void writeStartArray() throws IOException
{
_verifyValueWrite("start an array");
_outputContext = _outputContext.createChildArrayContext();
Boolean style = _outputOptions.getDefaultFlowStyle().getStyleBoolean();
FlowStyle style = _outputOptions.getDefaultFlowStyle();
String yamlTag = _typeId;
boolean implicit = (yamlTag == null);
String anchor = _objectId;
Expand Down Expand Up @@ -456,7 +457,7 @@ public final void writeStartObject() throws IOException
{
_verifyValueWrite("start an object");
_outputContext = _outputContext.createChildObjectContext();
Boolean style = _outputOptions.getDefaultFlowStyle().getStyleBoolean();
FlowStyle style = _outputOptions.getDefaultFlowStyle();
String yamlTag = _typeId;
boolean implicit = (yamlTag == null);
String anchor = _objectId;
Expand Down Expand Up @@ -799,6 +800,6 @@ protected ScalarEvent _scalarEvent(String value, Character style)
// 29-Nov-2017, tatu: Not 100% sure why we don't force explicit tags for
// type id, but trying to do so seems to double up tag output...
return new ScalarEvent(anchor, yamlTag, NO_TAGS, value,
null, null, style);
null, null, ScalarStyle.createStyle(style));
}
}