@@ -115,7 +115,6 @@ public class UTF8JsonGenerator
115
115
*/
116
116
117
117
// @since 2.10
118
- @ SuppressWarnings ("deprecation" )
119
118
public UTF8JsonGenerator (IOContext ctxt , int features , ObjectCodec codec ,
120
119
OutputStream out , char quoteChar )
121
120
{
@@ -131,16 +130,15 @@ public UTF8JsonGenerator(IOContext ctxt, int features, ObjectCodec codec,
131
130
_outputBuffer = ctxt .allocWriteEncodingBuffer ();
132
131
_outputEnd = _outputBuffer .length ;
133
132
134
- /* To be exact, each char can take up to 6 bytes when escaped (Unicode
135
- * escape with backslash, 'u' and 4 hex digits); but to avoid fluctuation,
136
- * we will actually round down to only do up to 1/8 number of chars
137
- */
133
+ // To be exact, each char can take up to 6 bytes when escaped (Unicode
134
+ // escape with backslash, 'u' and 4 hex digits); but to avoid fluctuation,
135
+ // we will actually round down to only do up to 1/8 number of chars
138
136
_outputMaxContiguous = _outputEnd >> 3 ;
139
137
_charBuffer = ctxt .allocConcatBuffer ();
140
138
_charBufferLength = _charBuffer .length ;
141
139
142
140
// By default we use this feature to determine additional quoting
143
- if (isEnabled (Feature .ESCAPE_NON_ASCII )) {
141
+ if (isEnabled (JsonWriteFeature .ESCAPE_NON_ASCII . mappedFeature () )) {
144
142
setHighestNonEscapedChar (127 );
145
143
}
146
144
}
0 commit comments