@@ -189,20 +189,20 @@ private Feature(boolean defaultState) {
189
189
protected DumperOptions _outputOptions ;
190
190
191
191
// for field names, leave out quotes
192
- private final static Character STYLE_NAME = null ;
192
+ private final static DumperOptions . ScalarStyle STYLE_NAME = DumperOptions . ScalarStyle . PLAIN ;
193
193
194
194
// numbers, booleans, should use implicit
195
- private final static Character STYLE_SCALAR = null ;
195
+ private final static DumperOptions . ScalarStyle STYLE_SCALAR = DumperOptions . ScalarStyle . PLAIN ;
196
196
// Strings quoted for fun
197
- private final static Character STYLE_QUOTED = Character . valueOf ( '"' ) ;
197
+ private final static DumperOptions . ScalarStyle STYLE_QUOTED = DumperOptions . ScalarStyle . DOUBLE_QUOTED ;
198
198
// Strings in literal (block) style
199
- private final static Character STYLE_LITERAL = Character . valueOf ( '|' ) ;
199
+ private final static DumperOptions . ScalarStyle STYLE_LITERAL = DumperOptions . ScalarStyle . LITERAL ;
200
200
201
201
// Which flow style to use for Base64? Maybe basic quoted?
202
202
// 29-Nov-2017, tatu: Actually SnakeYAML uses block style so:
203
- private final static Character STYLE_BASE64 = STYLE_LITERAL ;
203
+ private final static DumperOptions . ScalarStyle STYLE_BASE64 = STYLE_LITERAL ;
204
204
205
- private final static Character STYLE_PLAIN = null ;
205
+ private final static DumperOptions . ScalarStyle STYLE_PLAIN = DumperOptions . ScalarStyle . PLAIN ;
206
206
207
207
/*
208
208
/**********************************************************
@@ -466,7 +466,7 @@ public final void writeStartArray() throws IOException
466
466
{
467
467
_verifyValueWrite ("start an array" );
468
468
_writeContext = _writeContext .createChildArrayContext ();
469
- Boolean style = _outputOptions .getDefaultFlowStyle (). getStyleBoolean ();
469
+ FlowStyle style = _outputOptions .getDefaultFlowStyle ();
470
470
String yamlTag = _typeId ;
471
471
boolean implicit = (yamlTag == null );
472
472
String anchor = _objectId ;
@@ -494,7 +494,7 @@ public final void writeStartObject() throws IOException
494
494
{
495
495
_verifyValueWrite ("start an object" );
496
496
_writeContext = _writeContext .createChildObjectContext ();
497
- Boolean style = _outputOptions .getDefaultFlowStyle (). getStyleBoolean ();
497
+ FlowStyle style = _outputOptions .getDefaultFlowStyle ();
498
498
String yamlTag = _typeId ;
499
499
boolean implicit = (yamlTag == null );
500
500
String anchor = _objectId ;
@@ -531,7 +531,7 @@ public void writeString(String text) throws IOException,JsonGenerationException
531
531
return ;
532
532
}
533
533
_verifyValueWrite ("write String value" );
534
- Character style = STYLE_QUOTED ;
534
+ DumperOptions . ScalarStyle style = STYLE_QUOTED ;
535
535
if (Feature .MINIMIZE_QUOTES .enabledIn (_formatFeatures ) && !isBooleanContent (text )) {
536
536
// If this string could be interpreted as a number, it must be quoted.
537
537
if (Feature .ALWAYS_QUOTE_NUMBERS_AS_STRINGS .enabledIn (_formatFeatures )
@@ -806,7 +806,7 @@ protected void _releaseBuffers() {
806
806
// ... and sometimes we specifically DO want explicit tag:
807
807
private final static ImplicitTuple EXPLICIT_TAGS = new ImplicitTuple (false , false );
808
808
809
- protected void _writeScalar (String value , String type , Character style ) throws IOException
809
+ protected void _writeScalar (String value , String type , DumperOptions . ScalarStyle style ) throws IOException
810
810
{
811
811
_emitter .emit (_scalarEvent (value , style ));
812
812
}
@@ -824,7 +824,7 @@ private void _writeScalarBinary(Base64Variant b64variant,
824
824
null , null , STYLE_BASE64 ));
825
825
}
826
826
827
- protected ScalarEvent _scalarEvent (String value , Character style )
827
+ protected ScalarEvent _scalarEvent (String value , DumperOptions . ScalarStyle style )
828
828
{
829
829
String yamlTag = _typeId ;
830
830
if (yamlTag != null ) {
0 commit comments