Closed feroozkhanchintu closed 8 years ago
Loop while (ptr < end)
is nested under label output_loop:
Special handling for labeled statements is needed to fix the NullPointerException
output_loop:
while (ptr < end) {
// Fast loop for chars not needing escaping
char c;
while (true) {
c = _outputBuffer[ptr];
if (c < escLimit) {
escCode = escCodes[c];
if (escCode != 0) {
break;
}
} else if (c > maxNonEscaped) {
escCode = CharacterEscapes.ESCAPE_STANDARD;
break;
} else {
if ((_currentEscape = customEscapes.getEscapeSequence(c)) != null) {
escCode = CharacterEscapes.ESCAPE_CUSTOM;
break;
}
}
if (++ptr >= end) {
break;
}
}
int flushLen = (ptr - start);
if (flushLen > 0) {
_writer.write(_outputBuffer, start, flushLen);
if (ptr >= end) {
break output_loop;
}
}
++ptr;
start = _prependOrWriteCharacterEscape(_outputBuffer, ptr, end, c, escCode);
}
Project : FasterXML/jackson-core (https://github.com/FasterXML/jackson-core) Package : com.fasterxml.jackson.core.json.WriterBasedJsonGenerator Method : private void _writeSegmentCustom(int) throws java.io.IOException Variable consideration : _writer Block : B2