Skip to content

Commit

Permalink
Minor warnings removal
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Nov 15, 2024
1 parent f5ed9e7 commit cc70bc2
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ public class UTF8JsonGenerator
*/

// @since 2.10
@SuppressWarnings("deprecation")
public UTF8JsonGenerator(IOContext ctxt, int features, ObjectCodec codec,
OutputStream out, char quoteChar)
{
Expand All @@ -131,16 +130,15 @@ public UTF8JsonGenerator(IOContext ctxt, int features, ObjectCodec codec,
_outputBuffer = ctxt.allocWriteEncodingBuffer();
_outputEnd = _outputBuffer.length;

/* To be exact, each char can take up to 6 bytes when escaped (Unicode
* escape with backslash, 'u' and 4 hex digits); but to avoid fluctuation,
* we will actually round down to only do up to 1/8 number of chars
*/
// To be exact, each char can take up to 6 bytes when escaped (Unicode
// escape with backslash, 'u' and 4 hex digits); but to avoid fluctuation,
// we will actually round down to only do up to 1/8 number of chars
_outputMaxContiguous = _outputEnd >> 3;
_charBuffer = ctxt.allocConcatBuffer();
_charBufferLength = _charBuffer.length;

// By default we use this feature to determine additional quoting
if (isEnabled(Feature.ESCAPE_NON_ASCII)) {
if (isEnabled(JsonWriteFeature.ESCAPE_NON_ASCII.mappedFeature())) {
setHighestNonEscapedChar(127);
}
}
Expand Down

0 comments on commit cc70bc2

Please sign in to comment.