@@ -178,8 +178,6 @@ public int getMask() {
178178 /**********************************************************
179179 */
180180
181- protected final IOContext _ioContext ;
182-
183181 /**
184182 * @since 2.16
185183 */
@@ -286,9 +284,9 @@ public int getMask() {
286284 /**********************************************************
287285 */
288286
289- public CBORGenerator (IOContext ctxt , int stdFeatures , int formatFeatures ,
287+ public CBORGenerator (IOContext ioCtxt , int stdFeatures , int formatFeatures ,
290288 ObjectCodec codec , OutputStream out ) {
291- super (stdFeatures , codec , /* Write Context */ null );
289+ super (stdFeatures , codec , ioCtxt , /* Write Context */ null );
292290 DupDetector dups = JsonGenerator .Feature .STRICT_DUPLICATE_DETECTION .enabledIn (stdFeatures )
293291 ? DupDetector .rootDetector (this )
294292 : null ;
@@ -297,14 +295,13 @@ public CBORGenerator(IOContext ctxt, int stdFeatures, int formatFeatures,
297295 _formatFeatures = formatFeatures ;
298296 _cfgMinimalInts = Feature .WRITE_MINIMAL_INTS .enabledIn (formatFeatures );
299297 _cfgMinimalDoubles = Feature .WRITE_MINIMAL_DOUBLES .enabledIn (formatFeatures );
300- _ioContext = ctxt ;
301- _streamWriteConstraints = ctxt .streamWriteConstraints ();
298+ _streamWriteConstraints = ioCtxt .streamWriteConstraints ();
302299 _out = out ;
303300 _bufferRecyclable = true ;
304301 _stringRefs = Feature .STRINGREF .enabledIn (formatFeatures ) ? new HashMap <>() : null ;
305- _outputBuffer = ctxt .allocWriteEncodingBuffer (BYTE_BUFFER_FOR_OUTPUT );
302+ _outputBuffer = ioCtxt .allocWriteEncodingBuffer (BYTE_BUFFER_FOR_OUTPUT );
306303 _outputEnd = _outputBuffer .length ;
307- _charBuffer = ctxt .allocConcatBuffer ();
304+ _charBuffer = ioCtxt .allocConcatBuffer ();
308305 _charBufferLength = _charBuffer .length ;
309306 // let's just sanity check to prevent nasty odd errors
310307 if (_outputEnd < MIN_BUFFER_LENGTH ) {
@@ -323,10 +320,10 @@ public CBORGenerator(IOContext ctxt, int stdFeatures, int formatFeatures,
323320 * Offset pointing past already buffered content; that is, number
324321 * of bytes of valid content to output, within buffer.
325322 */
326- public CBORGenerator (IOContext ctxt , int stdFeatures , int formatFeatures ,
323+ public CBORGenerator (IOContext ioCtxt , int stdFeatures , int formatFeatures ,
327324 ObjectCodec codec , OutputStream out , byte [] outputBuffer ,
328325 int offset , boolean bufferRecyclable ) {
329- super (stdFeatures , codec , /* Write Context */ null );
326+ super (stdFeatures , codec , ioCtxt , /* Write Context */ null );
330327 DupDetector dups = JsonGenerator .Feature .STRICT_DUPLICATE_DETECTION .enabledIn (stdFeatures )
331328 ? DupDetector .rootDetector (this )
332329 : null ;
@@ -335,15 +332,14 @@ public CBORGenerator(IOContext ctxt, int stdFeatures, int formatFeatures,
335332 _formatFeatures = formatFeatures ;
336333 _cfgMinimalInts = Feature .WRITE_MINIMAL_INTS .enabledIn (formatFeatures );
337334 _cfgMinimalDoubles = Feature .WRITE_MINIMAL_DOUBLES .enabledIn (formatFeatures );
338- _ioContext = ctxt ;
339- _streamWriteConstraints = ctxt .streamWriteConstraints ();
335+ _streamWriteConstraints = ioCtxt .streamWriteConstraints ();
340336 _out = out ;
341337 _bufferRecyclable = bufferRecyclable ;
342338 _outputTail = offset ;
343339 _outputBuffer = outputBuffer ;
344340 _stringRefs = Feature .STRINGREF .enabledIn (formatFeatures ) ? new HashMap <>() : null ;
345341 _outputEnd = _outputBuffer .length ;
346- _charBuffer = ctxt .allocConcatBuffer ();
342+ _charBuffer = ioCtxt .allocConcatBuffer ();
347343 _charBufferLength = _charBuffer .length ;
348344 // let's just sanity check to prevent nasty odd errors
349345 if (_outputEnd < MIN_BUFFER_LENGTH ) {
0 commit comments