FasterXML / jackson-core
Showing 82 of 202 files from the diff.
Other files ignored by Codecov

@@ -214,7 +214,7 @@
Loading
214 214
            ++_index;
215 215
            return (ix < 0) ? STATUS_OK_AS_IS : STATUS_OK_AFTER_COMMA;
216 216
        }
217 -
        
217 +
218 218
        // Nope, root context
219 219
        // No commas within root context, but need space
220 220
        ++_index;

@@ -111,7 +111,7 @@
Loading
111 111
    /* Public API, byte buffers
112 112
    /**********************************************************
113 113
     */
114 -
    
114 +
115 115
    /**
116 116
     * @param ix One of <code>READ_IO_BUFFER</code> constants.
117 117
     *
@@ -142,7 +142,7 @@
Loading
142 142
    /* Public API, char buffers
143 143
    /**********************************************************
144 144
     */
145 -
    
145 +
146 146
    public final char[] allocCharBuffer(int ix) {
147 147
        return allocCharBuffer(ix, 0);
148 148
    }

@@ -27,7 +27,7 @@
Loading
27 27
    /* Location/state information
28 28
    /**********************************************************************
29 29
     */
30 -
    
30 +
31 31
    /**
32 32
     * Name of the property of which value is to be parsed; only
33 33
     * used for OBJECT contexts
@@ -127,7 +127,7 @@
Loading
127 127
    /* State changes
128 128
    /**********************************************************************
129 129
     */
130 -
    
130 +
131 131
    public TokenFilter setPropertyName(String name) {
132 132
        _currentName = name;
133 133
        _needToHandleName = true;
@@ -274,7 +274,7 @@
Loading
274 274
        }
275 275
        return _parent;
276 276
    }
277 -
    
277 +
278 278
    public void skipParentChecks() {
279 279
        _filter = null;
280 280
        for (TokenFilterContext ctxt = _parent; ctxt != null; ctxt = ctxt._parent) {
@@ -334,7 +334,7 @@
Loading
334 334
        // should never occur but...
335 335
        return null;
336 336
    }
337 -
    
337 +
338 338
    // // // Internally used abstract methods
339 339
340 340
    protected void appendDesc(StringBuilder sb) {

@@ -45,7 +45,7 @@
Loading
45 45
    /* Output buffering
46 46
    /**********************************************************************
47 47
     */
48 -
    
48 +
49 49
    /**
50 50
     * Intermediate buffer in which contents are buffered before
51 51
     * being written using {@link #_writer}.
@@ -218,7 +218,7 @@
Loading
218 218
        // we know there's room for at least one more char
219 219
        _outputBuffer[_outputTail++] = _quoteChar;
220 220
        // The beef:
221 -
        
221 +
222 222
        int len = name.appendQuoted(_outputBuffer, _outputTail);
223 223
        if (len < 0) {
224 224
            _writeNameTail(name);
@@ -294,7 +294,7 @@
Loading
294 294
        }
295 295
        return this;
296 296
    }
297 -
    
297 +
298 298
    @Override
299 299
    public JsonGenerator writeEndArray() throws JacksonException
300 300
    {
@@ -393,7 +393,7 @@
Loading
393 393
394 394
        if (_cfgUnqNames) {// non-standard, omit quotes
395 395
            _writeString(name);
396 -
        } else { 
396 +
        } else {
397 397
            if (_outputTail >= _outputEnd) {
398 398
                _flushBuffer();
399 399
            }
@@ -561,7 +561,7 @@
Loading
561 561
        }
562 562
        _outputBuffer[_outputTail++] = _quoteChar;
563 563
    }
564 -
    
564 +
565 565
    @Override
566 566
    public JsonGenerator writeRawUTF8String(byte[] text, int offset, int length) throws JacksonException {
567 567
        // could add support for buffering if we really want it...
@@ -617,7 +617,7 @@
Loading
617 617
        if (room >= len) {
618 618
            text.getChars(offset, offset+len, _outputBuffer, _outputTail);
619 619
            _outputTail += len;
620 -
        } else {            	
620 +
        } else {
621 621
            writeRawLong(text.substring(offset, offset+len));
622 622
        }
623 623
        return this;
@@ -784,7 +784,7 @@
Loading
784 784
        _outputBuffer[_outputTail++] = _quoteChar;
785 785
        _outputTail = NumberOutput.outputInt(s, _outputBuffer, _outputTail);
786 786
        _outputBuffer[_outputTail++] = _quoteChar;
787 -
    }    
787 +
    }
788 788
789 789
    @Override
790 790
    public JsonGenerator writeNumber(int i) throws JacksonException
@@ -809,7 +809,7 @@
Loading
809 809
        _outputBuffer[_outputTail++] = _quoteChar;
810 810
        _outputTail = NumberOutput.outputInt(i, _outputBuffer, _outputTail);
811 811
        _outputBuffer[_outputTail++] = _quoteChar;
812 -
    }    
812 +
    }
813 813
814 814
    @Override
815 815
    public JsonGenerator writeNumber(long l) throws JacksonException
@@ -1200,7 +1200,7 @@
Loading
1200 1200
        // First things first: let's flush the buffer to get some more room
1201 1201
        _flushBuffer();
1202 1202
1203 -
        // Then we can write 
1203 +
        // Then we can write
1204 1204
        final int textLen = text.length();
1205 1205
        int offset = 0;
1206 1206
        do {
@@ -1232,7 +1232,7 @@
Loading
1232 1232
    {
1233 1233
        final int[] escCodes = _outputEscapes;
1234 1234
        final int escLen = escCodes.length;
1235 -
    
1235 +
1236 1236
        int ptr = 0;
1237 1237
        int start = ptr;
1238 1238
@@ -1270,7 +1270,7 @@
Loading
1270 1270
            start = _prependOrWriteCharacterEscape(_outputBuffer, ptr, end, c, escCodes[c]);
1271 1271
        }
1272 1272
    }
1273 -
    
1273 +
1274 1274
    /**
1275 1275
     * This method called when the string content is already in
1276 1276
     * a char buffer, and need not be copied for processing.
@@ -1330,7 +1330,7 @@
Loading
1330 1330
            }
1331 1331
            // Nope, need to escape the char.
1332 1332
            char c = text[offset++];
1333 -
            _appendCharacterEscape(c, escCodes[c]);          
1333 +
            _appendCharacterEscape(c, escCodes[c]);
1334 1334
        }
1335 1335
    }
1336 1336
@@ -1352,7 +1352,7 @@
Loading
1352 1352
        final int[] escCodes = _outputEscapes;
1353 1353
        final int escLimit = Math.min(escCodes.length, maxNonEscaped+1);
1354 1354
        int escCode = 0;
1355 -
        
1355 +
1356 1356
        output_loop:
1357 1357
        while (_outputTail < end) {
1358 1358
            char c;
@@ -1391,11 +1391,11 @@
Loading
1391 1391
    {
1392 1392
        final int[] escCodes = _outputEscapes;
1393 1393
        final int escLimit = Math.min(escCodes.length, maxNonEscaped+1);
1394 -
    
1394 +
1395 1395
        int ptr = 0;
1396 1396
        int escCode = 0;
1397 1397
        int start = ptr;
1398 -
    
1398 +
1399 1399
        output_loop:
1400 1400
        while (ptr < end) {
1401 1401
            // Fast loop for chars not needing escaping
@@ -1440,11 +1440,11 @@
Loading
1440 1440
        final int escLimit = Math.min(escCodes.length, maxNonEscaped+1);
1441 1441
1442 1442
        int escCode = 0;
1443 -
        
1443 +
1444 1444
        while (offset < len) {
1445 1445
            int start = offset;
1446 1446
            char c;
1447 -
            
1447 +
1448 1448
            while (true) {
1449 1449
                c = text[offset];
1450 1450
                if (c < escLimit) {
@@ -1556,11 +1556,11 @@
Loading
1556 1556
        final int maxNonEscaped = (_maximumNonEscapedChar < 1) ? 0xFFFF : _maximumNonEscapedChar;
1557 1557
        final int escLimit = Math.min(escCodes.length, maxNonEscaped+1);
1558 1558
        final CharacterEscapes customEscapes = _characterEscapes;
1559 -
    
1559 +
1560 1560
        int ptr = 0;
1561 1561
        int escCode = 0;
1562 1562
        int start = ptr;
1563 -
    
1563 +
1564 1564
        output_loop:
1565 1565
        while (ptr < end) {
1566 1566
            // Fast loop for chars not needing escaping
@@ -1611,11 +1611,11 @@
Loading
1611 1611
        final CharacterEscapes customEscapes = _characterEscapes;
1612 1612
1613 1613
        int escCode = 0;
1614 -
        
1614 +
1615 1615
        while (offset < len) {
1616 1616
            int start = offset;
1617 1617
            char c;
1618 -
            
1618 +
1619 1619
            while (true) {
1620 1620
                c = text[offset];
1621 1621
                if (c < escLimit) {
@@ -1636,7 +1636,7 @@
Loading
1636 1636
                    break;
1637 1637
                }
1638 1638
            }
1639 -
    
1639 +
1640 1640
            // Short span? Better just copy it to buffer first:
1641 1641
            int newAmount = offset - start;
1642 1642
            if (newAmount < SHORT_WRITE) {
@@ -1671,7 +1671,7 @@
Loading
1671 1671
    /* Internal methods, low-level writing; binary
1672 1672
    /**********************************************************************
1673 1673
     */
1674 -
    
1674 +
1675 1675
    protected final void _writeBinary(Base64Variant b64variant, byte[] input, int inputPtr, final int inputEnd)
1676 1676
        throws JacksonException
1677 1677
    {
@@ -1720,8 +1720,8 @@
Loading
1720 1720
    {
1721 1721
        int inputPtr = 0;
1722 1722
        int inputEnd = 0;
1723 -
        int lastFullOffset = -3;       
1724 -
        
1723 +
        int lastFullOffset = -3;
1724 +
1725 1725
        // Let's also reserve room for possible (and quoted) lf char each round
1726 1726
        int safeOutputEnd = _outputEnd - 6;
1727 1727
        int chunksBeforeLF = b64variant.getMaxLineLength() >> 2;
@@ -1749,7 +1749,7 @@
Loading
1749 1749
                chunksBeforeLF = b64variant.getMaxLineLength() >> 2;
1750 1750
            }
1751 1751
        }
1752 -
        
1752 +
1753 1753
        // And then we may have 1 or 2 leftover bytes to encode
1754 1754
        if (bytesLeft > 0) {
1755 1755
            inputEnd = _readMore(data, readBuffer, inputPtr, inputEnd, bytesLeft);
@@ -1772,7 +1772,7 @@
Loading
1772 1772
        }
1773 1773
        return bytesLeft;
1774 1774
    }
1775 -
    
1775 +
1776 1776
    // write method when length is unknown
1777 1777
    protected final int _writeBinary(Base64Variant b64variant,
1778 1778
            InputStream data, byte[] readBuffer)
@@ -1782,7 +1782,7 @@
Loading
1782 1782
        int inputEnd = 0;
1783 1783
        int lastFullOffset = -3;
1784 1784
        int bytesDone = 0;
1785 -
        
1785 +
1786 1786
        // Let's also reserve room for possible (and quoted) LF char each round
1787 1787
        int safeOutputEnd = _outputEnd - 6;
1788 1788
        int chunksBeforeLF = b64variant.getMaxLineLength() >> 2;
@@ -1829,7 +1829,7 @@
Loading
1829 1829
        }
1830 1830
        return bytesDone;
1831 1831
    }
1832 -
    
1832 +
1833 1833
    private int _readMore(InputStream in,
1834 1834
            byte[] readBuffer, int inputPtr, int inputEnd,
1835 1835
            int maxRead) throws JacksonException
@@ -1842,7 +1842,7 @@
Loading
1842 1842
        inputPtr = 0;
1843 1843
        inputEnd = i;
1844 1844
        maxRead = Math.min(maxRead, readBuffer.length);
1845 -
        
1845 +
1846 1846
        do {
1847 1847
            int length = maxRead - inputEnd;
1848 1848
            if (length == 0) {
@@ -1851,7 +1851,7 @@
Loading
1851 1851
            int count;
1852 1852
1853 1853
            try {
1854 -
                count = in.read(readBuffer, inputEnd, length);            
1854 +
                count = in.read(readBuffer, inputEnd, length);
1855 1855
            } catch (IOException e) {
1856 1856
                throw _wrapIOFailure(e);
1857 1857
            }
@@ -1868,7 +1868,7 @@
Loading
1868 1868
    /* Internal methods, low-level writing, other
1869 1869
    /**********************************************************************
1870 1870
     */
1871 -
    
1871 +
1872 1872
    private final void _writeNull() throws JacksonException
1873 1873
    {
1874 1874
        if ((_outputTail + 4) >= _outputEnd) {
@@ -1993,7 +1993,7 @@
Loading
1993 1993
    /**
1994 1994
     * Method called to try to either prepend character escape at front of
1995 1995
     * given buffer; or if not possible, to write it out directly.
1996 -
     * 
1996 +
     *
1997 1997
     * @return Pointer to start of prepended entity (if prepended); or 'ptr'
1998 1998
     *   if not.
1999 1999
     */
@@ -2148,7 +2148,7 @@
Loading
2148 2148
        escape.getChars(0, len, _outputBuffer, _outputTail);
2149 2149
        _outputTail += len;
2150 2150
    }
2151 -
    
2151 +
2152 2152
    private char[] _allocateEntityBuffer()
2153 2153
    {
2154 2154
        char[] buf = new char[14];

@@ -241,7 +241,7 @@
Loading
241 241
    protected void _loadMoreGuaranteed() throws JacksonException {
242 242
        if (!_loadMore()) { _reportInvalidEOF(); }
243 243
    }
244 -
    
244 +
245 245
    protected boolean _loadMore() throws JacksonException
246 246
    {
247 247
        if (_reader != null) {
@@ -332,7 +332,7 @@
Loading
332 332
        }
333 333
        return 0;
334 334
    }
335 -
    
335 +
336 336
    // // // Let's override default impls for improved performance
337 337
338 338
    @Override
@@ -802,7 +802,7 @@
Loading
802 802
        _nextToken = null;
803 803
804 804
// !!! 16-Nov-2015, tatu: TODO: fix [databind#37], copy next location to current here
805 -
        
805 +
806 806
        // Also: may need to start new context?
807 807
        if (t == JsonToken.START_ARRAY) {
808 808
            _streamReadContext = _streamReadContext.createChildArrayContext(_tokenInputRow, _tokenInputCol);
@@ -953,7 +953,7 @@
Loading
953 953
            _nextToken = JsonToken.VALUE_STRING;
954 954
            return name;
955 955
        }
956 -
        
956 +
957 957
        // Ok: we must have a value... what is it?
958 958
959 959
        JsonToken t;
@@ -1178,10 +1178,10 @@
Loading
1178 1178
        /*
1179 1179
         * This check proceeds only if the Feature.ALLOW_MISSING_VALUES is enabled
1180 1180
         * The Check is for missing values. In case of missing values in an array, the next token will be either ',' or ']'.
1181 -
         * This case, decrements the already incremented _inputPtr in the buffer in case of comma(,) 
1181 +
         * This case, decrements the already incremented _inputPtr in the buffer in case of comma(,)
1182 1182
         * so that the existing flow goes back to checking the next token which will be comma again and
1183 1183
         * it continues the parsing.
1184 -
         * Also the case returns NULL as current token in case of ',' or ']'.    
1184 +
         * Also the case returns NULL as current token in case of ',' or ']'.
1185 1185
         */
1186 1186
// case ']':  // 11-May-2020, tatu: related to [core#616], this should never be reached
1187 1187
        case ',':
@@ -1189,7 +1189,7 @@
Loading
1189 1189
            if (!_streamReadContext.inRoot()) {
1190 1190
                if ((_formatReadFeatures & FEAT_MASK_ALLOW_MISSING) != 0) {
1191 1191
                    --_inputPtr;
1192 -
                    return (_currToken = JsonToken.VALUE_NULL);  
1192 +
                    return (_currToken = JsonToken.VALUE_NULL);
1193 1193
                }
1194 1194
            }
1195 1195
        }
@@ -2783,7 +2783,7 @@
Loading
2783 2783
            }
2784 2784
            ++_inputPtr;
2785 2785
        } while (++i < len);
2786 -
    
2786 +
2787 2787
        // but let's also ensure we either get EOF, or non-alphanum char...
2788 2788
        if (_inputPtr >= _inputEnd && !_loadMore()) {
2789 2789
            return;

@@ -67,9 +67,9 @@
Loading
67 67
    public enum Feature
68 68
        implements JacksonFeature
69 69
    {
70 -
        
70 +
71 71
        // // // Symbol handling (interning etc)
72 -
        
72 +
73 73
        /**
74 74
         * Feature that determines whether JSON object property names are
75 75
         * to be canonicalized using {@link String#intern} or not:
@@ -157,7 +157,7 @@
Loading
157 157
        public int getMask() { return (1 << ordinal()); }
158 158
    }
159 159
160 -
    
160 +
161 161
162 162
    /*
163 163
    /**********************************************************************
@@ -175,7 +175,7 @@
Loading
175 175
     * by default.
176 176
     */
177 177
    protected final static int DEFAULT_STREAM_READ_FEATURE_FLAGS = StreamReadFeature.collectDefaults();
178 -
    
178 +
179 179
    /**
180 180
     * Bitfield (set of flags) of all generator features that are enabled
181 181
     * by default.
@@ -216,7 +216,7 @@
Loading
216 216
    /**
217 217
     * Active StreamReadConstraints to use.
218 218
     */
219 -
    protected final StreamReadConstraints _streamReadConstraints;    
219 +
    protected final StreamReadConstraints _streamReadConstraints;
220 220
221 221
    /*
222 222
    /**********************************************************************
@@ -333,7 +333,7 @@
Loading
333 333
    /* Capability introspection
334 334
    /**********************************************************************
335 335
     */
336 -
    
336 +
337 337
    /**
338 338
     * Introspection method that higher-level functionality may call
339 339
     * to see whether underlying data format requires a stable ordering
@@ -728,7 +728,7 @@
Loading
728 728
    /*
729 729
    /**********************************************************************
730 730
    /* Parser factories, convenience methods that do not specify
731 -
    /* `ObjectReadContext` 
731 +
    /* `ObjectReadContext`
732 732
    /**********************************************************************
733 733
     */
734 734
@@ -899,7 +899,7 @@
Loading
899 899
     */
900 900
    public <P extends JsonParser & ByteArrayFeeder> P createNonBlockingByteArrayParser(ObjectReadContext readCtxt)
901 901
            throws JacksonException {
902 -
        return _unsupported("Non-blocking source not (yet?) support for this format ("+getFormatName()+")");        
902 +
        return _unsupported("Non-blocking source not (yet?) support for this format ("+getFormatName()+")");
903 903
    }
904 904
905 905
    /**
@@ -1004,7 +1004,7 @@
Loading
1004 1004
     *
1005 1005
     * @param writeCtxt Object-binding context where applicable; used for providing contextual
1006 1006
     *    configuration
1007 -
     * @param w Writer to use for writing content 
1007 +
     * @param w Writer to use for writing content
1008 1008
     *
1009 1009
     * @return Generator constructed
1010 1010
     *
@@ -1085,10 +1085,10 @@
Loading
1085 1085
    /*
1086 1086
    /**********************************************************************
1087 1087
    /* Generator factories, convenience methods that do not specify
1088 -
    /* `ObjectWriteContext` 
1088 +
    /* `ObjectWriteContext`
1089 1089
    /**********************************************************************
1090 1090
     */
1091 -
    
1091 +
1092 1092
    /**
1093 1093
     * Method for constructing JSON generator for writing content
1094 1094
     * using specified output stream.
@@ -1106,7 +1106,7 @@
Loading
1106 1106
     * Note: there are formats that use fixed encoding (like most binary data formats)
1107 1107
     * and that ignore passed in encoding.
1108 1108
     *
1109 -
     * @param out OutputStream to use for writing content 
1109 +
     * @param out OutputStream to use for writing content
1110 1110
     * @param enc Character encoding to use
1111 1111
     *
1112 1112
     * @return Generator constructed
@@ -1123,7 +1123,7 @@
Loading
1123 1123
     * Convenience method for constructing generator that uses default
1124 1124
     * encoding of the format (UTF-8 for JSON and most other data formats),
1125 1125
     *
1126 -
     * @param out OutputStream to use for writing content 
1126 +
     * @param out OutputStream to use for writing content
1127 1127
     *
1128 1128
     * @return Generator constructed
1129 1129
     *
@@ -1133,7 +1133,7 @@
Loading
1133 1133
    public JsonGenerator createGenerator(OutputStream out) throws JacksonException {
1134 1134
        return createGenerator(ObjectWriteContext.empty(), out, JsonEncoding.UTF8);
1135 1135
    }
1136 -
    
1136 +
1137 1137
    /**
1138 1138
     * Method for constructing JSON generator for writing content
1139 1139
     * using specified Writer.
@@ -1145,7 +1145,7 @@
Loading
1145 1145
     * {@link tools.jackson.core.StreamWriteFeature#AUTO_CLOSE_TARGET} is enabled).
1146 1146
     * Using application needs to close it explicitly.
1147 1147
     *
1148 -
     * @param w Writer to use for writing content 
1148 +
     * @param w Writer to use for writing content
1149 1149
     *
1150 1150
     * @return Generator constructed
1151 1151
     *
@@ -1395,7 +1395,7 @@
Loading
1395 1395
    /* Error reporting methods
1396 1396
    /**********************************************************************
1397 1397
     */
1398 -
    
1398 +
1399 1399
    protected JacksonException _wrapIOFailure(IOException e) {
1400 1400
        return WrappedIOException.construct(e, this);
1401 1401
    }
@@ -1403,7 +1403,7 @@
Loading
1403 1403
    protected <T> T _unsupported() {
1404 1404
        return _unsupported("Operation not supported for this format (%s)", getFormatName());
1405 1405
    }
1406 -
    
1406 +
1407 1407
    protected <T> T _unsupported(String str, Object... args) {
1408 1408
        throw new UnsupportedOperationException(String.format(str, args));
1409 1409
    }

@@ -198,7 +198,7 @@
Loading
198 198
199 199
    /**
200 200
     * Length of the exponent part of the number, if any, not
201 -
     * including 'e' marker or sign, just digits. 
201 +
     * including 'e' marker or sign, just digits.
202 202
     * Not used for  pure integer values.
203 203
     */
204 204
    protected int _expLength;
@@ -419,7 +419,7 @@
Loading
419 419
     */
420 420
421 421
    // // // Life-cycle of number-parsing
422 -
    
422 +
423 423
    protected final JsonToken reset(boolean negative, int intLen, int fractLen, int expLen)
424 424
    {
425 425
        if (fractLen < 1 && expLen < 1) { // integer
@@ -444,7 +444,7 @@
Loading
444 444
        _numTypesValid = NR_UNKNOWN; // to force decoding
445 445
        return JsonToken.VALUE_NUMBER_INT;
446 446
    }
447 -
    
447 +
448 448
    protected final JsonToken resetFloat(boolean negative, int intLen, int fractLen, int expLen)
449 449
    {
450 450
        // Inelegant but we know how to create StreamReadExceptions,
@@ -462,7 +462,7 @@
Loading
462 462
        _numTypesValid = NR_UNKNOWN; // to force decoding
463 463
        return JsonToken.VALUE_NUMBER_FLOAT;
464 464
    }
465 -
    
465 +
466 466
    protected final JsonToken resetAsNaN(String valueStr, double value)
467 467
    {
468 468
        _textBuffer.resetWithString(valueStr);
@@ -615,7 +615,7 @@
Loading
615 615
            }
616 616
            return NumberType.BIG_INTEGER;
617 617
        }
618 -
    
618 +
619 619
        /* And then floating point types. Here optimal type
620 620
         * needs to be big decimal, to avoid losing any data?
621 621
         * However... using BD is slow, so let's allow returning
@@ -630,7 +630,7 @@
Loading
630 630
        }
631 631
        return NumberType.DOUBLE;
632 632
    }
633 -
    
633 +
634 634
    @Override
635 635
    public int getIntValue() throws JacksonException
636 636
    {
@@ -644,7 +644,7 @@
Loading
644 644
        }
645 645
        return _numberInt;
646 646
    }
647 -
    
647 +
648 648
    @Override
649 649
    public long getLongValue() throws JacksonException
650 650
    {
@@ -658,7 +658,7 @@
Loading
658 658
        }
659 659
        return _numberLong;
660 660
    }
661 -
    
661 +
662 662
    @Override
663 663
    public BigInteger getBigIntegerValue()
664 664
    {
@@ -672,7 +672,7 @@
Loading
672 672
        }
673 673
        return _getBigInteger();
674 674
    }
675 -
    
675 +
676 676
    @Override
677 677
    public float getFloatValue() throws JacksonException
678 678
    {
@@ -707,7 +707,7 @@
Loading
707 707
        }
708 708
        return _getNumberDouble();
709 709
    }
710 -
    
710 +
711 711
    @Override
712 712
    public BigDecimal getDecimalValue()
713 713
    {
@@ -819,7 +819,7 @@
Loading
819 819
        }
820 820
        _numTypesValid |= NR_LONG;
821 821
    }
822 -
    
822 +
823 823
    protected void convertNumberToBigInteger()
824 824
    {
825 825
        if ((_numTypesValid & NR_BIGDECIMAL) != 0) {
@@ -840,7 +840,7 @@
Loading
840 840
        }
841 841
        _numTypesValid |= NR_BIGINT;
842 842
    }
843 -
    
843 +
844 844
    protected void convertNumberToDouble() throws InputCoercionException
845 845
    {
846 846
        /* 05-Aug-2008, tatus: Important note: this MUST start with
@@ -848,7 +848,7 @@
Loading
848 848
         *   value is the original one (others get generated when
849 849
         *   requested)
850 850
         */
851 -
    
851 +
852 852
        if ((_numTypesValid & NR_BIGDECIMAL) != 0) {
853 853
            if (_numberString != null) {
854 854
                _numberDouble = _getNumberFloat();
@@ -912,7 +912,7 @@
Loading
912 912
        }
913 913
        _numTypesValid |= NR_FLOAT;
914 914
    }
915 -
    
915 +
916 916
    protected void convertNumberToBigDecimal()
917 917
    {
918 918
        // 05-Aug-2008, tatus: Important note: this MUST start with more
@@ -1036,7 +1036,7 @@
Loading
1036 1036
    protected char _decodeEscaped() throws JacksonException {
1037 1037
        throw new UnsupportedOperationException();
1038 1038
    }
1039 -
    
1039 +
1040 1040
    protected final int _decodeBase64Escape(Base64Variant b64variant, int ch, int index)
1041 1041
        throws JacksonException
1042 1042
    {
@@ -1060,7 +1060,7 @@
Loading
1060 1060
        }
1061 1061
        return bits;
1062 1062
    }
1063 -
    
1063 +
1064 1064
    protected final int _decodeBase64Escape(Base64Variant b64variant, char ch, int index)
1065 1065
        throws JacksonException
1066 1066
    {
@@ -1085,7 +1085,7 @@
Loading
1085 1085
        }
1086 1086
        return bits;
1087 1087
    }
1088 -
    
1088 +
1089 1089
    protected <T> T _reportInvalidBase64Char(Base64Variant b64variant, int ch, int bindex)
1090 1090
            throws StreamReadException {
1091 1091
        return _reportInvalidBase64Char(b64variant, ch, bindex, null);

@@ -194,7 +194,7 @@
Loading
194 194
        }
195 195
        _outPtr = outPtr;
196 196
    }
197 -
    
197 +
198 198
    @Override
199 199
    public void write(int c) throws IOException
200 200
    {
@@ -370,11 +370,11 @@
Loading
370 370
        }
371 371
        return 0x10000 + ((firstPart - SURR1_FIRST) << 10) + (secondPart - SURR2_FIRST);
372 372
    }
373 -
    
373 +
374 374
    protected static void illegalSurrogate(int code) throws IOException {
375 375
        throw new IOException(illegalSurrogateDesc(code));
376 376
    }
377 -
    
377 +
378 378
    protected static String illegalSurrogateDesc(int code)
379 379
    {
380 380
        if (code > 0x10FFFF) { // over max?

@@ -7,7 +7,7 @@
Loading
7 7
 * {@link JsonPointer} and matches a single value accordingly.
8 8
 * Instances are immutable and fully thread-safe, shareable,
9 9
 * and efficient to use.
10 -
 * 
10 +
 *
11 11
 * @since 2.6
12 12
 */
13 13
public class JsonPointerBasedFilter extends TokenFilter
@@ -50,12 +50,12 @@
Loading
50 50
    public TokenFilter filterStartArray() {
51 51
        return this;
52 52
    }
53 -
    
53 +
54 54
    @Override
55 55
    public TokenFilter filterStartObject() {
56 56
        return this;
57 57
    }
58 -
    
58 +
59 59
    @Override
60 60
    protected boolean _includeScalar() {
61 61
        // should only occur for root-level scalars, path "/"

@@ -35,7 +35,7 @@
Loading
35 35
     * which signals starting of an Object value.
36 36
     */
37 37
    START_OBJECT("{", JsonTokenId.ID_START_OBJECT),
38 -
        
38 +
39 39
    /**
40 40
     * END_OBJECT is returned when encountering '}'
41 41
     * which signals ending of an Object value
@@ -97,7 +97,7 @@
Loading
97 97
     * has internal floating-point representation).
98 98
     */
99 99
    VALUE_NUMBER_FLOAT(null, JsonTokenId.ID_NUMBER_FLOAT),
100 -
    
100 +
101 101
    /**
102 102
     * VALUE_TRUE is returned when encountering literal "true" in
103 103
     * value context
@@ -116,7 +116,7 @@
Loading
116 116
     */
117 117
    VALUE_NULL("null", JsonTokenId.ID_NULL),
118 118
        ;
119 -
    
119 +
120 120
    final String _serialized;
121 121
122 122
    final char[] _serializedChars;
@@ -124,7 +124,7 @@
Loading
124 124
    final byte[] _serializedBytes;
125 125
126 126
    final int _id;
127 -
    
127 +
128 128
    final boolean _isStructStart, _isStructEnd;
129 129
130 130
    final boolean _isNumber;
@@ -155,7 +155,7 @@
Loading
155 155
            }
156 156
        }
157 157
        _id = id;
158 -
        
158 +
159 159
        _isBoolean = (id == JsonTokenId.ID_FALSE || id == JsonTokenId.ID_TRUE);
160 160
        _isNumber = (id == JsonTokenId.ID_NUMBER_INT || id == JsonTokenId.ID_NUMBER_FLOAT);
161 161
@@ -168,7 +168,7 @@
Loading
168 168
    }
169 169
170 170
    public final int id() { return _id; }
171 -
    
171 +
172 172
    public final String asString() { return _serialized; }
173 173
    public final char[] asCharArray() { return _serializedChars; }
174 174
    public final byte[] asByteArray() { return _serializedBytes; }

@@ -306,7 +306,7 @@
Loading
306 306
        _longNameOffset += qlen;
307 307
        return start;
308 308
    }
309 -
    
309 +
310 310
    /*
311 311
    /**********************************************************************
312 312
    /* API, accessors, mostly for Unit Tests
@@ -484,7 +484,7 @@
Loading
484 484
485 485
        final int[] hashArea = _hashArea;
486 486
        final int lenAndIndex = hashArea[offset+3];
487 -
        
487 +
488 488
        if ((hash == hashArea[offset]) && ((lenAndIndex & 0xFFFF) == qlen)) {
489 489
            // probable but not guaranteed: verify
490 490
            if (_verifyLongName(q, qlen, hashArea[offset+1])) {
@@ -631,7 +631,7 @@
Loading
631 631
        }
632 632
        return -1;
633 633
    }
634 -
    
634 +
635 635
    private boolean _verifyLongName(int[] q, int qlen, int spillOffset)
636 636
    {
637 637
        final int[] hashArea = _hashArea;
@@ -676,11 +676,11 @@
Loading
676 676
     */
677 677
678 678
    // // Copied straight frmo big quads canonicalizer: look comments there
679 -
    
679 +
680 680
    private final static int MULT = 33;
681 681
    private final static int MULT2 = 65599;
682 682
    private final static int MULT3 = 31;
683 -
    
683 +
684 684
    public int calcHash(int q1)
685 685
    {
686 686
        int hash = q1 + (q1 >>> 16) ^ (q1 << 3);
@@ -724,7 +724,7 @@
Loading
724 724
            hash += next;
725 725
        }
726 726
        hash *= MULT2;
727 -
        
727 +
728 728
        // and finally shuffle some more once done
729 729
        hash += (hash >>> 19);
730 730
        hash ^= (hash << 5);
@@ -742,7 +742,7 @@
Loading
742 742
                getClass().getName(), _count, _hashSize,
743 743
                pri, sec, tert, spill, (pri+sec+tert+spill), total);
744 744
    }
745 -
    
745 +
746 746
    /*
747 747
    /**********************************************************************
748 748
    /* Helper methods

@@ -41,7 +41,7 @@
Loading
41 41
    protected String _currentName;
42 42
43 43
    protected Object _currentValue;
44 -
    
44 +
45 45
    protected int _lineNr;
46 46
    protected int _columnNr;
47 47
@@ -97,7 +97,7 @@
Loading
97 97
    public static SimpleStreamReadContext createRootContext(DupDetector dups) {
98 98
        return createRootContext(1, 0, dups);
99 99
    }
100 -
    
100 +
101 101
    public SimpleStreamReadContext createChildArrayContext(int lineNr, int colNr) {
102 102
        SimpleStreamReadContext ctxt = _childToRecycle;
103 103
        if (ctxt == null) {
@@ -189,7 +189,7 @@
Loading
189 189
    /**
190 190
     * Method called to indicate what the "current" name (Object property name
191 191
     * just decoded) is: may also trigger duplicate detection.
192 -
     * 
192 +
     *
193 193
     * @param name Name of Object property encountered
194 194
     *
195 195
     * @throws StreamReadException If there is a duplicate name violation
@@ -209,5 +209,5 @@
Loading
209 209
            throw new StreamReadException(((src instanceof JsonParser) ? ((JsonParser) src) : null),
210 210
                    "Duplicate Object property \""+name+"\"");
211 211
        }
212 -
    }    
212 +
    }
213 213
}

@@ -116,7 +116,7 @@
Loading
116 116
        _rootSeparator = rootSeparator;
117 117
        withSeparators(DEFAULT_SEPARATORS);
118 118
    }
119 -
    
119 +
120 120
    public DefaultPrettyPrinter(DefaultPrettyPrinter base) {
121 121
        this(base, base._rootSeparator);
122 122
    }

@@ -103,7 +103,7 @@
Loading
103 103
        v = newValue;
104 104
        newValue /= 1000;
105 105
        int thousands = (v - (newValue * 1000));
106 -
        
106 +
107 107
        off = _leading3(newValue, b, off);
108 108
        off = _full3(thousands, b, off);
109 109
        return _full3(ones, b, off);
@@ -341,7 +341,7 @@
Loading
341 341
342 342
        return off;
343 343
    }
344 -
    
344 +
345 345
    private static int _outputFullBillion(int v, char[] b, int off)
346 346
    {
347 347
        int thousands = v / 1000;
@@ -366,7 +366,7 @@
Loading
366 366
367 367
        return off;
368 368
    }
369 -
    
369 +
370 370
    private static int _outputUptoBillion(int v, byte[] b, int off)
371 371
    {
372 372
        if (v < MILLION) { // at most 2 triplets...
@@ -457,7 +457,7 @@
Loading
457 457
        b[off++] = (byte) enc;
458 458
        return off;
459 459
    }
460 -
    
460 +
461 461
    private static int _leading3(int t, char[] b, int off)
462 462
    {
463 463
        int enc = TRIPLET_TO_CHARS[t];

@@ -123,7 +123,7 @@
Loading
123 123
     * Method for accessing simple type description of current context;
124 124
     * either ROOT (for root-level values), OBJECT (for Object property names and
125 125
     * values) or ARRAY (for elements of JSON Arrays)
126 -
     * 
126 +
     *
127 127
     * @return Type description String
128 128
     */
129 129
    public String typeDesc() {
@@ -179,7 +179,7 @@
Loading
179 179
        }
180 180
        return false;
181 181
    }
182 -
    
182 +
183 183
    /**
184 184
     * Method for accessing name associated with the current location.
185 185
     * Non-null for <code>PROPERTY_NAME</code> and value events that directly
@@ -200,7 +200,7 @@
Loading
200 200
     * it is only used by higher-level data-binding functionality.
201 201
     * The reason it is included here is that it can be stored and accessed hierarchically,
202 202
     * and gets passed through data-binding.
203 -
     * 
203 +
     *
204 204
     * @return Currently active value, if one has been assigned.
205 205
     */
206 206
    public Object currentValue() {

@@ -37,7 +37,7 @@
Loading
37 37
     * @param d Underlying generator to delegate calls to
38 38
     * @param delegateCopyMethods Flag assigned to <code>delagateCopyMethod</code>
39 39
     *   and which defines whether copy methods are handled locally (false), or
40 -
     *   delegated to configured 
40 +
     *   delegated to configured
41 41
     */
42 42
    public JsonGeneratorDelegate(JsonGenerator d, boolean delegateCopyMethods) {
43 43
        delegate = d;
@@ -276,7 +276,7 @@
Loading
276 276
        delegate.writeRaw(raw);
277 277
        return this;
278 278
    }
279 -
    
279 +
280 280
    @Override
281 281
    public JsonGenerator writeRaw(char[] text, int offset, int len) throws JacksonException {
282 282
        delegate.writeRaw(text, offset, len);
@@ -383,7 +383,7 @@
Loading
383 383
        delegate.writeBoolean(state);
384 384
        return this;
385 385
    }
386 -
    
386 +
387 387
    @Override
388 388
    public JsonGenerator writeNull() throws JacksonException {
389 389
        delegate.writeNull();
@@ -410,7 +410,7 @@
Loading
410 410
//    public JsonGenerator writePOJOProperty(String propName, Object pojo) throws JacksonException {
411 411
412 412
    // Sole exception being this method as it is not a "combo" method
413 -
    
413 +
414 414
    @Override
415 415
    public JsonGenerator writeOmittedProperty(String propName) throws JacksonException {
416 416
        delegate.writeOmittedProperty(propName);
@@ -452,7 +452,7 @@
Loading
452 452
    /* Public API, write methods, serializing Java objects
453 453
    /**********************************************************************
454 454
     */
455 -
    
455 +
456 456
    @Override
457 457
    public JsonGenerator writePOJO(Object pojo) throws JacksonException {
458 458
        if (delegateCopyMethods) {
@@ -466,7 +466,7 @@
Loading
466 466
        }
467 467
        return this;
468 468
    }
469 -
    
469 +
470 470
    @Override
471 471
    public JsonGenerator writeTree(TreeNode tree) throws JacksonException {
472 472
        if (delegateCopyMethods) {
@@ -522,7 +522,7 @@
Loading
522 522
    /* Public API, buffer handling
523 523
    /**********************************************************************
524 524
     */
525 -
    
525 +
526 526
    @Override public void flush() { delegate.flush(); }
527 527
    @Override public void close() { delegate.close(); }
528 528
@@ -531,7 +531,7 @@
Loading
531 531
    /* Closeable implementation
532 532
    /**********************************************************************
533 533
     */
534 -
    
534 +
535 535
    @Override public boolean isClosed() { return delegate.isClosed(); }
536 536
537 537
    /*

@@ -18,10 +18,10 @@
Loading
18 18
     * Method called by {@link tools.jackson.core.json.JsonFactory} instance when
19 19
     * creating generator for given {@link OutputStream}, when this decorator
20 20
     * has been registered.
21 -
     * 
21 +
     *
22 22
     * @param ctxt IO context in use (provides access to declared encoding)
23 23
     * @param out Original output destination
24 -
     * 
24 +
     *
25 25
     * @return OutputStream to use; either passed in argument, or something that
26 26
     *   calls it
27 27
     *
@@ -33,10 +33,10 @@
Loading
33 33
     * Method called by {@link tools.jackson.core.json.JsonFactory} instance when
34 34
     * creating generator for given {@link Writer}, when this decorator
35 35
     * has been registered.
36 -
     * 
36 +
     *
37 37
     * @param ctxt IO context in use (provides access to declared encoding)
38 38
     * @param w Original output writer
39 -
     * 
39 +
     *
40 40
     * @return Writer to use; either passed in argument, or something that calls it
41 41
     *
42 42
     * @throws JacksonException if construction of decorated {@link Writer} fails

@@ -320,7 +320,7 @@
Loading
320 320
321 321
    public String getRootValueSeparator() {
322 322
        return (_rootValueSeparator == null) ? null : _rootValueSeparator.getValue();
323 -
    }    
323 +
    }
324 324
325 325
    /*
326 326
    /**********************************************************************

@@ -42,7 +42,7 @@
Loading
42 42
"Cannot use type `%s` with JacksonFeatureSet: too many entries (%d > 31)",
43 43
desc, allFeatures.length));
44 44
        }
45 -
        
45 +
46 46
        int flags = 0;
47 47
        for (F f : allFeatures) {
48 48
            if (f.enabledByDefault()) {
@@ -97,7 +97,7 @@
Loading
97 97
98 98
    /**
99 99
     * Accessor for underlying bitmask
100 -
     * 
100 +
     *
101 101
     * @return Bitmask of enabled features
102 102
     */
103 103
    public int asBitmask() {

@@ -206,7 +206,7 @@
Loading
206 206
     * {@link #nonBlockingInputFeeder()} to obtain object to use
207 207
     * for feeding input; otherwise (<code>false</code> returned)
208 208
     * input is read by blocking.
209 -
     * 
209 +
     *
210 210
     * @return True if this is a non-blocking ("asynchronous") parser
211 211
     */
212 212
    public boolean canParseAsync() { return false; }
@@ -273,11 +273,11 @@
Loading
273 273
     * it can not.
274 274
     *
275 275
     * @param out OutputStream to which buffered, undecoded content is written to
276 -
     * 
276 +
     *
277 277
     * @return -1 if the underlying content source is not byte based
278 278
     *    (that is, input can not be sent to {@link OutputStream};
279 279
     *    otherwise number of bytes released (0 if there was nothing to release)
280 -
     *    
280 +
     *
281 281
     * @throws JacksonException if write to stream threw exception
282 282
     */
283 283
    public int releaseBuffered(OutputStream out) throws JacksonException {
@@ -294,11 +294,11 @@
Loading
294 294
     * it can not.
295 295
     *
296 296
     * @param w Writer to which buffered but unprocessed content is written to
297 -
     * 
297 +
     *
298 298
     * @return -1 if the underlying content source is not char-based
299 299
     *    (that is, input can not be sent to {@link Writer};
300 300
     *    otherwise number of chars released (0 if there was nothing to release)
301 -
     *    
301 +
     *
302 302
     * @throws JacksonException if write using Writer threw exception
303 303
     */
304 304
    public int releaseBuffered(Writer w) throws JacksonException { return -1; }
@@ -320,7 +320,7 @@
Loading
320 320
321 321
    /**
322 322
     * Bulk access method for getting state of all standard {@link StreamReadFeature}s.
323 -
     * 
323 +
     *
324 324
     * @return Bit mask that defines current states of all standard {@link StreamReadFeature}s.
325 325
     *
326 326
     * @since 3.0
@@ -643,7 +643,7 @@
Loading
643 643
     * so this method may be useful when building low-overhead codecs.
644 644
     * Note, however, that effect may not be big enough to matter: make sure
645 645
     * to profile performance before deciding to use this method.
646 -
     * 
646 +
     *
647 647
     * @return {@code int} matching one of constants from {@link JsonTokenId}.
648 648
     */
649 649
    public abstract int currentTokenId();
@@ -816,7 +816,7 @@
Loading
816 816
    public abstract String getText() throws JacksonException;
817 817
818 818
    /**
819 -
     * Method to read the textual representation of the current token in chunks and 
819 +
     * Method to read the textual representation of the current token in chunks and
820 820
     * pass it to the given Writer.
821 821
     * Conceptually same as calling:
822 822
     *<pre>
@@ -899,14 +899,14 @@
Loading
899 899
     * {@link #getTextCharacters} would be the most efficient
900 900
     * way to access textual content for the event parser currently
901 901
     * points to.
902 -
     *<p> 
902 +
     *<p>
903 903
     * Default implementation simply returns false since only actual
904 904
     * implementation class has knowledge of its internal buffering
905 905
     * state.
906 906
     * Implementations are strongly encouraged to properly override
907 907
     * this method, to allow efficient copying of content by other
908 908
     * code.
909 -
     * 
909 +
     *
910 910
     * @return True if parser currently has character array that can
911 911
     *   be efficiently returned via {@link #getTextCharacters}; false
912 912
     *   means that it may or may not exist
@@ -964,7 +964,7 @@
Loading
964 964
     * otherwise an exception is thrown
965 965
     *<p>
966 966
     * Default implementation simply returns {@link #getNumberValue()}
967 -
     * 
967 +
     *
968 968
     * @return Either {@link Number} (for already decoded numbers) or
969 969
     *   {@link String} (for deferred decoding).
970 970
     *
@@ -973,7 +973,7 @@
Loading
973 973
    public abstract Object getNumberValueDeferred() throws InputCoercionException;
974 974
975 975
    /**
976 -
     * If current token is of type 
976 +
     * If current token is of type
977 977
     * {@link JsonToken#VALUE_NUMBER_INT} or
978 978
     * {@link JsonToken#VALUE_NUMBER_FLOAT}, returns
979 979
     * one of {@link NumberType} constants; otherwise returns null.
@@ -1148,7 +1148,7 @@
Loading
1148 1148
    /* Public API, access to token information, other
1149 1149
    /**********************************************************************
1150 1150
     */
1151 -
    
1151 +
1152 1152
    /**
1153 1153
     * Convenience accessor that can be called when the current
1154 1154
     * token is {@link JsonToken#VALUE_TRUE} or
@@ -1236,9 +1236,9 @@
Loading
1236 1236
     * is that content will NOT remain accessible after method returns: any content
1237 1237
     * processed will be consumed and is not buffered in any way. If caller needs
1238 1238
     * buffering, it has to implement it.
1239 -
     * 
1239 +
     *
1240 1240
     * @param out Output stream to use for passing decoded binary data
1241 -
     * 
1241 +
     *
1242 1242
     * @return Number of bytes that were decoded and written via {@link OutputStream}
1243 1243
     *
1244 1244
     * @throws WrappedIOException for low-level read issues
@@ -1251,10 +1251,10 @@
Loading
1251 1251
    /**
1252 1252
     * Similar to {@link #readBinaryValue(OutputStream)} but allows explicitly
1253 1253
     * specifying base64 variant to use.
1254 -
     * 
1254 +
     *
1255 1255
     * @param bv base64 variant to use
1256 1256
     * @param out Output stream to use for passing decoded binary data
1257 -
     * 
1257 +
     *
1258 1258
     * @return Number of bytes that were decoded and written via {@link OutputStream}
1259 1259
     *
1260 1260
     * @throws WrappedIOException for low-level read issues
@@ -1362,7 +1362,7 @@
Loading
1362 1362
    public long getValueAsLong() throws InputCoercionException {
1363 1363
        return getValueAsLong(0);
1364 1364
    }
1365 -
    
1365 +
1366 1366
    /**
1367 1367
     * Method that will try to convert value of current token to a
1368 1368
     * {@code long}.
@@ -1383,7 +1383,7 @@
Loading
1383 1383
    public long getValueAsLong(long def) throws InputCoercionException {
1384 1384
        return def;
1385 1385
    }
1386 -
    
1386 +
1387 1387
    /**
1388 1388
     * Method that will try to convert value of current token to a Java
1389 1389
     * <b>double</b>.
@@ -1439,7 +1439,7 @@
Loading
1439 1439
    public String getValueAsString() {
1440 1440
        return getValueAsString(null);
1441 1441
    }
1442 -
    
1442 +
1443 1443
    /**
1444 1444
     * Method that will try to convert value of current token to a
1445 1445
     * {@link java.lang.String}.
@@ -1564,7 +1564,7 @@
Loading
1564 1564
     * Method to deserialize stream content into a Java type, reference
1565 1565
     * to which is passed as argument. Type is passed using so-called
1566 1566
     * "super type token"
1567 -
     * and specifically needs to be used if the root type is a 
1567 +
     * and specifically needs to be used if the root type is a
1568 1568
     * parameterized (generic) container type.
1569 1569
     *<br>
1570 1570
     * <b>Note</b>: method can only be called if the parser has

@@ -114,7 +114,7 @@
Loading
114 114
    /*  Encoding detection during bootstrapping
115 115
    /**********************************************************************
116 116
     */
117 -
    
117 +
118 118
    /**
119 119
     * Method that should be called after constructing an instace.
120 120
     * It will figure out encoding that content uses, to allow
@@ -140,7 +140,7 @@
Loading
140 140
                | ((_inputBuffer[_inputPtr+1] & 0xFF) << 16)
141 141
                | ((_inputBuffer[_inputPtr+2] & 0xFF) << 8)
142 142
                | (_inputBuffer[_inputPtr+3] & 0xFF);
143 -
            
143 +
144 144
            if (handleBOM(quad)) {
145 145
                foundEncoding = true;
146 146
            } else {
@@ -224,7 +224,7 @@
Loading
224 224
    /* Constructing a Reader
225 225
    /**********************************************************************
226 226
     */
227 -
    
227 +
228 228
    @SuppressWarnings("resource")
229 229
    public Reader constructReader() throws JacksonException
230 230
    {

@@ -33,7 +33,7 @@
Loading
33 33
 *   available is the row (line) number (but even that is approximate in
34 34
 *   case of two-byte linefeeds -- it should work with single CR or LF tho)
35 35
 *  </li>
36 -
 * <li>No white space validation: 
36 +
 * <li>No white space validation:
37 37
 *    checks are simplified NOT to check for control characters.
38 38
 *  </li>
39 39
 * </ul>
@@ -274,7 +274,7 @@
Loading
274 274
        }
275 275
        return super.getValueAsInt(defValue);
276 276
    }
277 -
    
277 +
278 278
    protected final String _getText2(JsonToken t)
279 279
    {
280 280
        if (t == null) {
@@ -299,7 +299,7 @@
Loading
299 299
    {
300 300
        if (_currToken != null) { // null only before/after document
301 301
            switch (_currToken.id()) {
302 -
                
302 +
303 303
            case ID_PROPERTY_NAME:
304 304
                return currentNameInBuffer();
305 305
            case ID_STRING:
@@ -311,7 +311,7 @@
Loading
311 311
            case ID_NUMBER_INT:
312 312
            case ID_NUMBER_FLOAT:
313 313
                return _textBuffer.getTextBuffer();
314 -
                
314 +
315 315
            default:
316 316
                return _currToken.asCharArray();
317 317
            }
@@ -363,7 +363,7 @@
Loading
363 363
        }
364 364
        return 0;
365 365
    }
366 -
    
366 +
367 367
    @Override
368 368
    public byte[] getBinaryValue(Base64Variant b64variant) throws JacksonException
369 369
    {
@@ -628,7 +628,7 @@
Loading
628 628
            _tokenIncomplete = true;
629 629
            _nextToken = JsonToken.VALUE_STRING;
630 630
            return _currToken;
631 -
        }        
631 +
        }
632 632
        JsonToken t;
633 633
634 634
        switch (i) {
@@ -728,13 +728,13 @@
Loading
728 728
        }
729 729
        return (_currToken = _handleUnexpectedValue(i));
730 730
    }
731 -
    
731 +
732 732
    private final JsonToken _nextAfterName()
733 733
    {
734 734
        _nameCopied = false; // need to invalidate if it was copied
735 735
        JsonToken t = _nextToken;
736 736
        _nextToken = null;
737 -
        
737 +
738 738
        // Also: may need to start new context?
739 739
        if (t == JsonToken.START_ARRAY) {
740 740
            _streamReadContext = _streamReadContext.createChildArrayContext(_tokenInputRow, _tokenInputCol);
@@ -1027,7 +1027,7 @@
Loading
1027 1027
    {
1028 1028
        char[] outBuf = _textBuffer.emptyAndGetCurrentSegment();
1029 1029
        int outPtr;
1030 -
        
1030 +
1031 1031
        // One special case: if first char is 0, must not be followed by a digit.
1032 1032
        // Gets a bit tricky as we only want to retain 0 if it's the full value
1033 1033
        if (c == INT_0) {
@@ -1267,7 +1267,7 @@
Loading
1267 1267
    /* Internal methods, secondary parsing
1268 1268
    /**********************************************************************
1269 1269
     */
1270 -
    
1270 +
1271 1271
    protected final String _parseName(int i) throws IOException
1272 1272
    {
1273 1273
        if (i != INT_QUOTE) {
@@ -1307,7 +1307,7 @@
Loading
1307 1307
                        return findName(q, 3);
1308 1308
                    }
1309 1309
                    return parseName(q, i, 3);
1310 -
                }                
1310 +
                }
1311 1311
                if (i == INT_QUOTE) { // 2 byte/char case or broken
1312 1312
                    return findName(q, 2);
1313 1313
                }
@@ -1317,7 +1317,7 @@
Loading
1317 1317
                return findName(q, 1);
1318 1318
            }
1319 1319
            return parseName(q, i, 1);
1320 -
        }     
1320 +
        }
1321 1321
        if (q == INT_QUOTE) { // special case, ""
1322 1322
            return "";
1323 1323
        }
@@ -1401,7 +1401,7 @@
Loading
1401 1401
        }
1402 1402
        return _parseLongName(i, q2, q3);
1403 1403
    }
1404 -
    
1404 +
1405 1405
    private final String _parseLongName(int q, final int q2, int q3)
1406 1406
            throws IOException
1407 1407
    {
@@ -1472,7 +1472,7 @@
Loading
1472 1472
        _quadBuffer[1] = q2;
1473 1473
        return parseEscapedName(_quadBuffer, 2, q3, ch, lastQuadBytes);
1474 1474
    }
1475 -
    
1475 +
1476 1476
    /* Slower parsing method which is generally branched to when
1477 1477
     * an escape sequence is detected (or alternatively for long
1478 1478
     * names, one crossing input buffer boundary).
@@ -1787,7 +1787,7 @@
Loading
1787 1787
        quads[2] = pad(q3, lastQuadBytes);
1788 1788
        return addName(quads, 3, lastQuadBytes);
1789 1789
    }
1790 -
    
1790 +
1791 1791
    private final String findName(int[] quads, int qlen, int lastQuad, int lastQuadBytes) throws StreamReadException
1792 1792
    {
1793 1793
        if (qlen >= quads.length) {
@@ -1859,13 +1859,13 @@
Loading
1859 1859
                if ((ix + needed) > byteLen) {
1860 1860
                    _reportInvalidEOF(" in property name", JsonToken.PROPERTY_NAME);
1861 1861
                }
1862 -
                
1862 +
1863 1863
                // Ok, always need at least one more:
1864 1864
                int ch2 = quads[ix >> 2]; // current quad, need to shift+mask
1865 1865
                byteIx = (ix & 3);
1866 1866
                ch2 = (ch2 >> ((3 - byteIx) << 3));
1867 1867
                ++ix;
1868 -
                
1868 +
1869 1869
                if ((ch2 & 0xC0) != 0x080) {
1870 1870
                    _reportInvalidOther(ch2);
1871 1871
                }
@@ -1875,7 +1875,7 @@
Loading
1875 1875
                    byteIx = (ix & 3);
1876 1876
                    ch2 = (ch2 >> ((3 - byteIx) << 3));
1877 1877
                    ++ix;
1878 -
                    
1878 +
1879 1879
                    if ((ch2 & 0xC0) != 0x080) {
1880 1880
                        _reportInvalidOther(ch2);
1881 1881
                    }
@@ -1972,7 +1972,7 @@
Loading
1972 1972
        }
1973 1973
        return _textBuffer.contentsAsString();
1974 1974
    }
1975 -
    
1975 +
1976 1976
    private final void _finishString2(char[] outBuf, int outPtr, int c)
1977 1977
        throws IOException
1978 1978
    {
@@ -2068,7 +2068,7 @@
Loading
2068 2068
            if (c == INT_QUOTE) {
2069 2069
                break main_loop;
2070 2070
            }
2071 -
            
2071 +
2072 2072
            switch (codes[c]) {
2073 2073
            case 1: // backslash
2074 2074
                _decodeEscaped();
@@ -2364,7 +2364,7 @@
Loading
2364 2364
            }
2365 2365
        }
2366 2366
    }
2367 -
    
2367 +
2368 2368
    private final int _skipWSComment(int i) throws IOException
2369 2369
    {
2370 2370
        while (true) {
@@ -2391,7 +2391,7 @@
Loading
2391 2391
                */
2392 2392
            }
2393 2393
            i = _inputData.readUnsignedByte();
2394 -
        }        
2394 +
        }
2395 2395
    }
2396 2396
2397 2397
    private final int _skipColon() throws IOException
@@ -2578,7 +2578,7 @@
Loading
2578 2578
            }
2579 2579
        }
2580 2580
    }
2581 -
    
2581 +
2582 2582
    @Override
2583 2583
    protected char _decodeEscaped() throws JacksonException {
2584 2584
        try {
@@ -2587,7 +2587,7 @@
Loading
2587 2587
            throw _wrapIOFailure(e);
2588 2588
        }
2589 2589
    }
2590 -
    
2590 +
2591 2591
    private char _decodeEscaped2() throws IOException
2592 2592
    {
2593 2593
        int c = _inputData.readUnsignedByte();
@@ -2636,7 +2636,7 @@
Loading
2636 2636
        int c = firstByte & 0xFF;
2637 2637
        if (c > 0x7F) { // if >= 0, is ascii and fine as is
2638 2638
            int needed;
2639 -
            
2639 +
2640 2640
            // Ok; if we end here, we got multi-byte combination
2641 2641
            if ((c & 0xE0) == 0xC0) { // 2 bytes (0x0080 - 0x07FF)
2642 2642
                c &= 0x1F;
@@ -2658,7 +2658,7 @@
Loading
2658 2658
                _reportInvalidOther(d & 0xFF);
2659 2659
            }
2660 2660
            c = (c << 6) | (d & 0x3F);
2661 -
            
2661 +
2662 2662
            if (needed > 1) { // needed == 1 means 2 bytes total
2663 2663
                d = _inputData.readUnsignedByte(); // 3rd byte
2664 2664
                if ((d & 0xC0) != 0x080) {
@@ -2809,7 +2809,7 @@
Loading
2809 2809
         }
2810 2810
         _reportError("Unrecognized token '"+sb.toString()+"': was expecting "+msg);
2811 2811
     }
2812 -
        
2812 +
2813 2813
    protected void _reportInvalidChar(int c)
2814 2814
        throws StreamReadException
2815 2815
    {
@@ -2853,7 +2853,7 @@
Loading
2853 2853
     * @param b64variant Type of base64 encoding expected in context
2854 2854
     *
2855 2855
     * @return Fully decoded value of base64 content
2856 -
     * 
2856 +
     *
2857 2857
     * @throws IOException for low-level I/O problem
2858 2858
     */
2859 2859
    @SuppressWarnings("resource")
@@ -2879,7 +2879,7 @@
Loading
2879 2879
                }
2880 2880
            }
2881 2881
            int decodedData = bits;
2882 -
            
2882 +
2883 2883
            // then second base64 char; can't get padding yet, nor ws
2884 2884
            ch = _inputData.readUnsignedByte();
2885 2885
            bits = b64variant.decodeBase64Char(ch);
@@ -2972,7 +2972,7 @@
Loading
2972 2972
//        }
2973 2973
2974 2974
        // No column tracking since we do not have pointers, DataInput has no offset
2975 -
        
2975 +
2976 2976
        return new JsonLocation(_contentReference(), -1L, -1L, _tokenInputRow, -1);
2977 2977
    }
2978 2978

@@ -206,7 +206,7 @@
Loading
206 206
    /* Overridden output state handling methods
207 207
    /**********************************************************************
208 208
     */
209 -
    
209 +
210 210
    @Override
211 211
    public final TokenStreamContext streamWriteContext() { return _streamWriteContext; }
212 212

@@ -67,7 +67,7 @@
Loading
67 67
    protected final static byte[] NO_BYTES = new byte[0];
68 68
69 69
    protected final static int[] NO_INTS = new int[0];
70 -
    
70 +
71 71
    /*
72 72
    /**********************************************************************
73 73
    /* Constants and fields wrt number handling
@@ -112,7 +112,7 @@
Loading
112 112
113 113
    protected final static int MIN_SHORT_I = (int) Short.MIN_VALUE;
114 114
    protected final static int MAX_SHORT_I = (int) Short.MAX_VALUE;
115 -
    
115 +
116 116
    protected final static long MIN_INT_L = (long) Integer.MIN_VALUE;
117 117
    protected final static long MAX_INT_L = (long) Integer.MAX_VALUE;
118 118
@@ -271,7 +271,7 @@
Loading
271 271
272 272
    // public JsonToken getCurrentToken()
273 273
    // public boolean hasCurrentToken()
274 -
  
274 +
275 275
    // public abstract void close();
276 276
    // public abstract boolean isClosed();
277 277
@@ -330,7 +330,7 @@
Loading
330 330
    @Override public boolean hasToken(JsonToken t) {
331 331
        return (_currToken == t);
332 332
    }
333 -
    
333 +
334 334
    @Override public boolean isExpectedStartArrayToken() { return _currToken == JsonToken.START_ARRAY; }
335 335
    @Override public boolean isExpectedStartObjectToken() { return _currToken == JsonToken.START_OBJECT; }
336 336
    @Override public boolean isExpectedNumberIntToken() { return _currToken == JsonToken.VALUE_NUMBER_INT; }
@@ -631,7 +631,7 @@
Loading
631 631
        }
632 632
        return getValueAsLong(0L);
633 633
    }
634 -
    
634 +
635 635
    @Override
636 636
    public long getValueAsLong(long defaultValue)
637 637
    {
@@ -1046,7 +1046,7 @@
Loading
1046 1046
    protected JacksonException _wrapIOFailure(IOException e) {
1047 1047
        return WrappedIOException.construct(e, this);
1048 1048
    }
1049 -
    
1049 +
1050 1050
    protected <T> T _throwInternal() {
1051 1051
        VersionUtil.throwInternal();
1052 1052
        return null; // never gets here

@@ -232,7 +232,7 @@
Loading
232 232
     * Method that will switch active delegate parser from the current one
233 233
     * to the next parser in sequence, if there is another parser left:
234 234
     * if so, the next parser will become the active delegate parser.
235 -
     * 
235 +
     *
236 236
     * @return True if switch succeeded; false otherwise
237 237
     */
238 238
    protected boolean switchToNext()

@@ -127,7 +127,7 @@
Loading
127 127
128 128
    /**
129 129
     * Decoding table used for skipping white space and comments.
130 -
     * 
130 +
     *
131 131
     * @since 2.3
132 132
     */
133 133
    protected final static int[] sInputCodesWS;
@@ -148,7 +148,7 @@
Loading
148 148
        buf['#'] = '#'; // start marker for YAML comments
149 149
        sInputCodesWS = buf;
150 150
    }
151 -
    
151 +
152 152
    /**
153 153
     * Lookup table used for determining which output characters in
154 154
     * 7-bit ASCII range need to be quoted.

@@ -186,7 +186,7 @@
Loading
186 186
    /**
187 187
     * Bulk access method for getting state of all standard (format-agnostic)
188 188
     * {@link StreamWriteFeature}s.
189 -
     * 
189 +
     *
190 190
     * @return Bit mask that defines current states of all standard {@link StreamWriteFeature}s.
191 191
     *
192 192
     * @since 3.0
@@ -215,7 +215,7 @@
Loading
215 215
     * Some generators may not support additional escaping: for example,
216 216
     * generators for binary formats that do not use escaping should
217 217
     * simply return 0.
218 -
     * 
218 +
     *
219 219
     * @return Currently active limitation for highest non-escaped character,
220 220
     *   if defined; or 0 to indicate no additional escaping is performed.
221 221
     */
@@ -347,7 +347,7 @@
Loading
347 347
     * Java object that the Array Object being written represents (if any)
348 348
     * and how many elements will be written for the array before calling
349 349
     * {@link #writeEndArray()}.
350 -
     * 
350 +
     *
351 351
     * @param currentValue Java Object that Array being written represents, if any
352 352
     *    (or {@code null} if not known or not applicable)
353 353
     * @param size Number of elements this Array will have: actual
@@ -908,7 +908,7 @@
Loading
908 908
909 909
    /**
910 910
     * Similar to {@link #writeBinary(Base64Variant,byte[],int,int)},
911 -
     * but default to using the Jackson default Base64 variant 
911 +
     * but default to using the Jackson default Base64 variant
912 912
     * (which is {@link Base64Variants#MIME_NO_LINEFEEDS}).
913 913
     *
914 914
     * @param data Buffer that contains binary data to write
@@ -924,7 +924,7 @@
Loading
924 924
925 925
    /**
926 926
     * Similar to {@link #writeBinary(Base64Variant,byte[],int,int)},
927 -
     * but assumes default to using the Jackson default Base64 variant 
927 +
     * but assumes default to using the Jackson default Base64 variant
928 928
     * (which is {@link Base64Variants#MIME_NO_LINEFEEDS}). Also
929 929
     * assumes that whole byte array is to be output.
930 930
     *
@@ -939,9 +939,9 @@
Loading
939 939
940 940
    /**
941 941
     * Similar to {@link #writeBinary(Base64Variant,InputStream,int)},
942 -
     * but assumes default to using the Jackson default Base64 variant 
942 +
     * but assumes default to using the Jackson default Base64 variant
943 943
     * (which is {@link Base64Variants#MIME_NO_LINEFEEDS}).
944 -
     * 
944 +
     *
945 945
     * @param data InputStream to use for reading binary data to write.
946 946
     *    Will not be closed after successful write operation
947 947
     * @param dataLength (optional) number of bytes that will be available;
@@ -958,12 +958,12 @@
Loading
958 958
    public int writeBinary(InputStream data, int dataLength) throws JacksonException {
959 959
        return writeBinary(Base64Variants.getDefaultVariant(), data, dataLength);
960 960
    }
961 -
    
961 +
962 962
    /**
963 963
     * Method similar to {@link #writeBinary(Base64Variant,byte[],int,int)},
964 964
     * but where input is provided through a stream, allowing for incremental
965 965
     * writes without holding the whole input in memory.
966 -
     * 
966 +
     *
967 967
     * @param bv Base64 variant to use
968 968
     * @param data InputStream to use for reading binary data to write.
969 969
     *    Will not be closed after successful write operation
@@ -975,7 +975,7 @@
Loading
975 975
     *    need not support cases where length is not known in advance; this
976 976
     *    depends on underlying data format: JSON output does NOT require length,
977 977
     *    other formats may.
978 -
     * 
978 +
     *
979 979
     * @return Number of bytes read from <code>data</code> and written as binary payload
980 980
     *
981 981
     * @throws WrappedIOException if there is an underlying I/O problem
@@ -1103,7 +1103,7 @@
Loading
1103 1103
     * for generator-wrappers around Java objects or JSON nodes.
1104 1104
     * If implementation does not implement this method,
1105 1105
     * it needs to throw {@link UnsupportedOperationException}.
1106 -
     * 
1106 +
     *
1107 1107
     * @param encodedValue Textual (possibly format) number representation to write
1108 1108
     *
1109 1109
     * @throws UnsupportedOperationException If underlying data format does not
@@ -1233,7 +1233,7 @@
Loading
1233 1233
    public JsonGenerator writeObjectRef(Object referenced) throws JacksonException {
1234 1234
        throw _constructWriteException("No native support for writing Object Ids");
1235 1235
    }
1236 -
    
1236 +
1237 1237
    /**
1238 1238
     * Method that can be called to output so-called native Type Id.
1239 1239
     * Note that it may only be called after ensuring this is legal
@@ -1294,7 +1294,7 @@
Loading
1294 1294
                    && incl.requiresObjectContext()) {
1295 1295
                typeIdDef.include = incl = WritableTypeId.Inclusion.WRAPPER_ARRAY;
1296 1296
            }
1297 -
            
1297 +
1298 1298
            switch (incl) {
1299 1299
            case PARENT_PROPERTY:
1300 1300
                // nothing to do here, as it has to be written in suffix...
@@ -1691,7 +1691,7 @@
Loading
1691 1691
    }
1692 1692
1693 1693
    // // // But this method does need to be delegate so...
1694 -
    
1694 +
1695 1695
    /**
1696 1696
     * Method called to indicate that a property in this position was
1697 1697
     * skipped. It is usually only called for generators that return

@@ -56,7 +56,7 @@
Loading
56 56
    /**
57 57
     * Default initial table size. Shouldn't be miniscule (as there's
58 58
     * cost to both array realloc and rehashing), but let's keep
59 -
     * it reasonably small. For systems that properly 
59 +
     * it reasonably small. For systems that properly
60 60
     * reuse factories it doesn't matter either way; but when
61 61
     * recreating factories often, initial overhead may dominate.
62 62
     */
@@ -99,7 +99,7 @@
Loading
99 99
     * defined, and child instance is released (call to <code>release</code>),
100 100
     * parent's shared tables may be updated from the child instance.
101 101
     */
102 -
    final protected CharsToNameCanonicalizer _parent;
102 +
    protected final CharsToNameCanonicalizer _parent;
103 103
104 104
    /**
105 105
     * Member that is only used by the root table instance: root
@@ -107,7 +107,7 @@
Loading
107 107
     * may return new state if they add entries to the table.
108 108
     * Child tables do NOT use the reference.
109 109
     */
110 -
    final protected AtomicReference<TableInfo> _tableInfo;
110 +
    protected final AtomicReference<TableInfo> _tableInfo;
111 111
112 112
    /**
113 113
     * Seed value we use as the base to make hash codes non-static between
@@ -116,9 +116,9 @@
Loading
116 116
     * This is done for security reasons, to avoid potential DoS attack via
117 117
     * hash collisions.
118 118
     */
119 -
    final protected int _seed;
119 +
    protected final int _seed;
120 120
121 -
    final protected int _flags;
121 +
    protected final int _flags;
122 122
123 123
    /**
124 124
     * Whether any canonicalization should be attempted (whether using
@@ -222,7 +222,7 @@
Loading
222 222
    {
223 223
        _parent = null;
224 224
        _seed = seed;
225 -
        
225 +
226 226
        // these settings don't really matter for the bootstrap instance
227 227
        _canonicalize = true;
228 228
        _flags = -1;
@@ -276,7 +276,7 @@
Loading
276 276
     * instance. Root instance is never used directly; its main use is for
277 277
     * storing and sharing underlying symbol arrays as needed.
278 278
     *
279 -
     * @return Root instance to use for constructing new child instances 
279 +
     * @return Root instance to use for constructing new child instances
280 280
     */
281 281
    public static CharsToNameCanonicalizer createRoot() {
282 282
        // Need to use a variable seed, to thwart hash-collision based attacks.
@@ -378,7 +378,7 @@
Loading
378 378
    /**
379 379
     * Method for checking number of primary hash buckets this symbol
380 380
     * table uses.
381 -
     * 
381 +
     *
382 382
     * @return number of primary slots table has currently
383 383
     */
384 384
    public int bucketCount() {  return _symbols.length; }
@@ -389,14 +389,14 @@
Loading
389 389
     * Method mostly needed by unit tests; calculates number of
390 390
     * entries that are in collision list. Value can be at most
391 391
     * ({@link #size} - 1), but should usually be much lower, ideally 0.
392 -
     * 
392 +
     *
393 393
     * @since 2.1
394 394
     *
395 395
     * @return Number of collisions in the primary hash area
396 396
     */
397 397
    public int collisionCount() {
398 398
        int count = 0;
399 -
        
399 +
400 400
        for (Bucket bucket : _buckets) {
401 401
            if (bucket != null) {
402 402
                count += bucket.length;
@@ -588,7 +588,7 @@
Loading
588 588
    public int calcHash(String key)
589 589
    {
590 590
        final int len = key.length();
591 -
        
591 +
592 592
        int hash = _seed;
593 593
        for (int i = 0; i < len; ++i) {
594 594
            hash = (hash * HASH_MULT) + (int) key.charAt(i);
@@ -742,7 +742,7 @@
Loading
742 742
        for (String s : _symbols) {
743 743
            if (s != null) ++primaryCount;
744 744
        }
745 -
        
745 +
746 746
        sb.append("[BytesToNameCanonicalizer, size: ");
747 747
        sb.append(_size);
748 748
        sb.append('/');

@@ -52,13 +52,13 @@
Loading
52 52
    /* Default introspection
53 53
    /**********************************************************************
54 54
     */
55 -
    
55 +
56 56
    @Override
57 57
    public boolean canHandleBinaryNatively() {
58 58
        // binary formats tend to support native inclusion:
59 59
        return true;
60 60
    }
61 -
    
61 +
62 62
    /*
63 63
    /**********************************************************************
64 64
    /* Factory methods: parsers
@@ -109,7 +109,7 @@
Loading
109 109
    }
110 110
111 111
    @Override
112 -
    public JsonParser createParser(ObjectReadContext readCtxt, 
112 +
    public JsonParser createParser(ObjectReadContext readCtxt,
113 113
            byte[] data, int offset, int len) throws JacksonException
114 114
    {
115 115
        IOContext ioCtxt = _createContext(_createContentReference(data, offset, len),
@@ -124,19 +124,19 @@
Loading
124 124
    }
125 125
126 126
    @Override
127 -
    public JsonParser createParser(ObjectReadContext readCtxt, 
127 +
    public JsonParser createParser(ObjectReadContext readCtxt,
128 128
            String content) throws JacksonException {
129 129
        return _nonByteSource();
130 130
    }
131 131
132 132
    @Override
133 -
    public JsonParser createParser(ObjectReadContext readCtxt, 
133 +
    public JsonParser createParser(ObjectReadContext readCtxt,
134 134
            char[] content, int offset, int len) throws JacksonException {
135 135
        return _nonByteSource();
136 136
    }
137 -
    
137 +
138 138
    @Override
139 -
    public JsonParser createParser(ObjectReadContext readCtxt, 
139 +
    public JsonParser createParser(ObjectReadContext readCtxt,
140 140
            DataInput in) throws JacksonException {
141 141
        IOContext ioCtxt = _createContext(_createContentReference(in), false);
142 142
        return _createParser(readCtxt, ioCtxt, _decorate(ioCtxt, in));
@@ -145,7 +145,7 @@
Loading
145 145
    protected abstract JsonParser _createParser(ObjectReadContext readCtxt,
146 146
            IOContext ioCtxt, InputStream in) throws JacksonException;
147 147
148 -
    protected abstract JsonParser _createParser(ObjectReadContext readCtxt, 
148 +
    protected abstract JsonParser _createParser(ObjectReadContext readCtxt,
149 149
            IOContext ioCtxt, byte[] data, int offset, int len) throws JacksonException;
150 150
151 151
    protected abstract JsonParser _createParser(ObjectReadContext readCtxt,
@@ -212,7 +212,7 @@
Loading
212 212
    {
213 213
        // false -> not textual
214 214
        return ContentReference.construct(false, contentRef, offset, length);
215 -
    }    
215 +
    }
216 216
217 217
    /*
218 218
    /**********************************************************************

@@ -95,7 +95,7 @@
Loading
95 95
            return (this == METADATA_PROPERTY) || (this == PAYLOAD_PROPERTY);
96 96
        }
97 97
    }
98 -
    
98 +
99 99
    /**
100 100
     * Java object for which type id is being written. Not needed by default handling,
101 101
     * but may be useful for customized format handling.
@@ -152,7 +152,7 @@
Loading
152 152
     * to be available on matching "suffix write".
153 153
     */
154 154
    public Object extra;
155 -
    
155 +
156 156
    public WritableTypeId() { }
157 157
158 158
    /**

@@ -14,18 +14,18 @@
Loading
14 14
    implements java.io.Serializable // since 2.1
15 15
{
16 16
    private static final long serialVersionUID = 1L;
17 -
    
17 +
18 18
    /**
19 19
     * Method called by {@link tools.jackson.core.json.JsonFactory} instance when
20 20
     * creating parser given an {@link InputStream}, when this decorator
21 21
     * has been registered.
22 -
     * 
22 +
     *
23 23
     * @param ctxt IO context in use (provides access to declared encoding).
24 24
     *   NOTE: at this point context may not have all information initialized;
25 25
     *   specifically auto-detected encoding is only available once parsing starts,
26 26
     *   which may occur only after this method is called.
27 27
     * @param in Original input source
28 -
     * 
28 +
     *
29 29
     * @return InputStream to use; either 'in' as is, or decorator
30 30
     *   version that typically delegates to 'in'
31 31
     *
@@ -39,7 +39,7 @@
Loading
39 39
     * creating parser on given "raw" byte source.
40 40
     * Method can either construct a {@link InputStream} for reading; or return
41 41
     * null to indicate that no wrapping should occur.
42 -
     * 
42 +
     *
43 43
     * @param ctxt IO context in use (provides access to declared encoding)
44 44
     *   NOTE: at this point context may not have all information initialized;
45 45
     *   specifically auto-detected encoding is only available once parsing starts,
@@ -47,7 +47,7 @@
Loading
47 47
     * @param src Input buffer that contains contents to parse
48 48
     * @param offset Offset of the first available byte in the input buffer
49 49
     * @param length Number of bytes available in the input buffer
50 -
     * 
50 +
     *
51 51
     * @return Either {@link InputStream} to use as input source; or null to indicate
52 52
     *   that contents are to be processed as-is by caller
53 53
     *
@@ -62,13 +62,13 @@
Loading
62 62
     * has been registered.
63 63
     *<p>
64 64
     * Default implementation simply throws {@link UnsupportedOperationException}
65 -
     * 
65 +
     *
66 66
     * @param ctxt IO context in use (provides access to declared encoding).
67 67
     *   NOTE: at this point context may not have all information initialized;
68 68
     *   specifically auto-detected encoding is only available once parsing starts,
69 69
     *   which may occur only after this method is called.
70 70
     * @param input Original input source
71 -
     * 
71 +
     *
72 72
     * @return InputStream to use; either 'input' as is, or decorator
73 73
     *   version that typically delegates to 'input'
74 74
     *
@@ -82,13 +82,13 @@
Loading
82 82
     * Method called by {@link tools.jackson.core.json.JsonFactory} instance when
83 83
     * creating parser given an {@link Reader}, when this decorator
84 84
     * has been registered.
85 -
     * 
85 +
     *
86 86
     * @param ctxt IO context in use (provides access to declared encoding)
87 87
     *   NOTE: at this point context may not have all information initialized;
88 88
     *   specifically auto-detected encoding is only available once parsing starts,
89 89
     *   which may occur only after this method is called.
90 90
     * @param r Original reader
91 -
     * 
91 +
     *
92 92
     * @return Reader to use; either passed in argument, or something that
93 93
     *   calls it (for example, a {@link FilterReader})
94 94
     *

@@ -33,13 +33,13 @@
Loading
33 33
     * sequence to output.
34 34
     */
35 35
    public final static int ESCAPE_CUSTOM = -2;
36 -
    
36 +
37 37
    /**
38 38
     * Method generators can call to get lookup table for determining
39 39
     * escape handling for first 128 characters of Unicode (ASCII
40 40
     * characters. Caller is not to modify contents of this array, since
41 41
     * this is expected to be a shared copy.
42 -
     * 
42 +
     *
43 43
     * @return Array with size of at least 128, where first 128 entries
44 44
     *    have either one of <code>ESCAPE_xxx</code> constants, or non-zero positive
45 45
     *    integer (meaning of which is data format specific; for JSON it means

@@ -47,7 +47,7 @@
Loading
47 47
48 48
    // Since 2.10 we have stateless singleton and NO fancy ThreadLocal/SofRef caching!!!
49 49
    private final static JsonStringEncoder instance = new JsonStringEncoder();
50 -
    
50 +
51 51
    public JsonStringEncoder() { }
52 52
53 53
    /**
@@ -105,7 +105,7 @@
Loading
105 105
                    break outer;
106 106
                }
107 107
            }
108 -
            // something to escape; 2 or 6-char variant? 
108 +
            // something to escape; 2 or 6-char variant?
109 109
            if (qbuf == null) {
110 110
                qbuf = _qbuf();
111 111
            }
@@ -198,7 +198,7 @@
Loading
198 198
        int outputPtr = 0;
199 199
        byte[] outputBuffer = new byte[_initialByteBufSize(inputEnd)];
200 200
        ByteArrayBuilder bb = null;
201 -
        
201 +
202 202
        main:
203 203
        while (inputPtr < inputEnd) {
204 204
            final int[] escCodes = CharTypes.get7BitOutputEscapes();

@@ -6,7 +6,7 @@
Loading
6 6
/**
7 7
 * Default linefeed-based indenter, used by {@link DefaultPrettyPrinter} (unless
8 8
 * overridden). Uses system-specific linefeeds and 2 spaces for indentation per level.
9 -
 * 
9 +
 *
10 10
 * @since 2.5
11 11
 */
12 12
public class DefaultIndenter
@@ -42,7 +42,7 @@
Loading
42 42
    public DefaultIndenter() {
43 43
        this("  ", SYS_LF);
44 44
    }
45 -
    
45 +
46 46
    /**
47 47
     * Create an indenter which uses the <code>indent</code> string to indent one level
48 48
     * and the <code>eol</code> string to separate lines.
@@ -63,7 +63,7 @@
Loading
63 63
64 64
        this.eol = eol;
65 65
    }
66 -
    
66 +
67 67
    public DefaultIndenter withLinefeed(String lf)
68 68
    {
69 69
        if (lf.equals(eol)) {
@@ -71,7 +71,7 @@
Loading
71 71
        }
72 72
        return new DefaultIndenter(getIndent(), lf);
73 73
    }
74 -
    
74 +
75 75
    public DefaultIndenter withIndent(String indent)
76 76
    {
77 77
        if (indent.equals(getIndent())) {
@@ -90,17 +90,17 @@
Loading
90 90
        if (level > 0) { // should we err on negative values (as there's some flaw?)
91 91
            level *= charsPerLevel;
92 92
            while (level > indents.length) { // unlike to happen but just in case
93 -
                jg.writeRaw(indents, 0, indents.length); 
93 +
                jg.writeRaw(indents, 0, indents.length);
94 94
                level -= indents.length;
95 95
            }
96 96
            jg.writeRaw(indents, 0, level);
97 97
        }
98 98
    }
99 -
    
99 +
100 100
    public String getEol() {
101 101
        return eol;
102 102
    }
103 -
    
103 +
104 104
    public String getIndent() {
105 105
        return new String(indents, 0, charsPerLevel);
106 106
    }

@@ -78,7 +78,7 @@
Loading
78 78
    {
79 79
        g.writeRaw('{');
80 80
    }
81 -
    
81 +
82 82
    @Override
83 83
    public void beforeObjectEntries(JsonGenerator g) throws JacksonException
84 84
    {
@@ -97,7 +97,7 @@
Loading
97 97
    {
98 98
        g.writeRaw(_separators.getObjectNameValueSeparator());
99 99
    }
100 -
    
100 +
101 101
    /**
102 102
     * Method called after an object entry (field:value) has been completely
103 103
     * output, and before another value is to be output.
@@ -116,13 +116,13 @@
Loading
116 116
    {
117 117
        g.writeRaw('}');
118 118
    }
119 -
    
119 +
120 120
    @Override
121 121
    public void writeStartArray(JsonGenerator g) throws JacksonException
122 122
    {
123 123
        g.writeRaw('[');
124 124
    }
125 -
    
125 +
126 126
    @Override
127 127
    public void beforeArrayValues(JsonGenerator g) throws JacksonException
128 128
    {
@@ -141,7 +141,7 @@
Loading
141 141
    {
142 142
        g.writeRaw(_separators.getArrayValueSeparator());
143 143
    }
144 -
    
144 +
145 145
    @Override
146 146
    public void writeEndArray(JsonGenerator g, int nrOfValues) throws JacksonException
147 147
    {

@@ -41,7 +41,7 @@
Loading
41 41
     *
42 42
     * @param cls Class for which to look version information
43 43
     *
44 -
     * @return Version information discovered if any; 
44 +
     * @return Version information discovered if any;
45 45
     *  {@link Version#unknownVersion()} if none
46 46
     */
47 47
    public static Version versionFor(Class<?> cls)

@@ -33,7 +33,7 @@
Loading
33 33
     * flush the map.
34 34
     */
35 35
    private final Object lock = new Object();
36 -
    
36 +
37 37
    private InternCache() { super(MAX_ENTRIES, 0.8f, 4); }
38 38
39 39
    public String intern(String input) {

@@ -89,7 +89,7 @@
Loading
89 89
     * @return Object node created
90 90
     */
91 91
    public ObjectTreeNode createObjectNode();
92 -
    
92 +
93 93
    // // // Databinding callbacks, value serialization
94 94
95 95
    /**
@@ -114,7 +114,7 @@
Loading
114 114
        protected static Base EMPTY_CONTEXT = new Base();
115 115
116 116
        // // // Config access methods
117 -
        
117 +
118 118
        @Override
119 119
        public FormatSchema getSchema() { return null; }
120 120
@@ -143,7 +143,7 @@
Loading
143 143
        public TokenStreamFactory tokenStreamFactory() {
144 144
            return _reportUnsupportedOperation();
145 145
        }
146 -
        
146 +
147 147
        @Override
148 148
        public int getFormatWriteFeatures(int defaults) {
149 149
            return defaults;
@@ -160,7 +160,7 @@
Loading
160 160
        public ArrayTreeNode createArrayNode() {
161 161
            return _reportUnsupportedOperation();
162 162
        }
163 -
        
163 +
164 164
        @Override
165 165
        public void writeValue(JsonGenerator g, Object value) {
166 166
            _reportUnsupportedOperation();
@@ -170,7 +170,7 @@
Loading
170 170
        public void writeTree(JsonGenerator g, TreeNode value) {
171 171
            _reportUnsupportedOperation();
172 172
        }
173 -
        
173 +
174 174
        protected <T> T _reportUnsupportedOperation() {
175 175
            throw new UnsupportedOperationException("Operation not supported by `ObjectWriteContext` of type "+getClass().getName());
176 176
        }

@@ -14,7 +14,7 @@
Loading
14 14
 * {@link ClassLoader} would have dangling reference via {@link ThreadLocal}s.
15 15
 * When gc clears a SoftReference, it puts it on a newly introduced referenceQueue.
16 16
 * We use this queue to release the inactive SoftReferences from the Set.
17 -
 * 
17 +
 *
18 18
 * @since 2.9.6
19 19
 */
20 20
class ThreadLocalBufferManager

@@ -31,7 +31,7 @@
Loading
31 31
    AUTO_CLOSE_SOURCE(true),
32 32
33 33
    // // // Validity checks
34 -
    
34 +
35 35
    /**
36 36
     * Feature that determines whether {@link JsonParser} will explicitly
37 37
     * check that no duplicate JSON Object Property names are encountered.

@@ -46,7 +46,7 @@
Loading
46 46
47 47
    @Override
48 48
    public Object processor() { return _processor; }
49 -
    
49 +
50 50
    @Override // just for co-variant type
51 51
    public IOException getCause() {
52 52
        return (IOException) super.getCause();

@@ -36,7 +36,7 @@
Loading
36 36
37 37
    @Override
38 38
    public TokenStreamContext streamReadContext() { return delegate.streamReadContext(); }
39 -
    
39 +
40 40
    @Override
41 41
    public ObjectReadContext objectReadContext() { return delegate.objectReadContext(); }
42 42
@@ -75,7 +75,7 @@
Loading
75 75
        return this;
76 76
    }
77 77
    */
78 -
 
78 +
79 79
    @Override public boolean isEnabled(StreamReadFeature f) { return delegate.isEnabled(f); }
80 80
    @Override public int streamReadFeatures() { return delegate.streamReadFeatures(); }
81 81
@@ -189,7 +189,7 @@
Loading
189 189
190 190
    @Override
191 191
    public boolean getBooleanValue() throws InputCoercionException { return delegate.getBooleanValue(); }
192 -
    
192 +
193 193
    @Override
194 194
    public byte getByteValue() throws InputCoercionException { return delegate.getByteValue(); }
195 195

@@ -70,14 +70,14 @@
Loading
70 70
     * Temporary input pointer
71 71
     */
72 72
    private int _quadPtr;
73 -
    
73 +
74 74
    /**
75 75
     * Value of {@link #_inputPtr} at the time when the first character of
76 76
     * name token was read. Used for calculating token location when requested;
77 77
     * combined with {@link #_currInputProcessed}, may be updated appropriately
78 78
     * as needed.
79 79
     */
80 -
    protected int _nameStartOffset; 
80 +
    protected int _nameStartOffset;
81 81
82 82
    protected int _nameStartRow;
83 83
@@ -198,7 +198,7 @@
Loading
198 198
            if (space == 0) { // only occurs when we've been closed
199 199
                return false;
200 200
            }
201 -
            
201 +
202 202
            int count;
203 203
            try {
204 204
                count = _inputStream.read(_inputBuffer, 0, space);
@@ -421,7 +421,7 @@
Loading
421 421
    {
422 422
        if (_currToken != null) { // null only before/after document
423 423
            switch (_currToken.id()) {
424 -
                
424 +
425 425
            case ID_PROPERTY_NAME:
426 426
                return currentNameInBuffer();
427 427
            case ID_STRING:
@@ -433,7 +433,7 @@
Loading
433 433
            case ID_NUMBER_INT:
434 434
            case ID_NUMBER_FLOAT:
435 435
                return _textBuffer.getTextBuffer();
436 -
                
436 +
437 437
            default:
438 438
                return _currToken.asCharArray();
439 439
            }
@@ -446,7 +446,7 @@
Loading
446 446
    {
447 447
        if (_currToken != null) { // null only before/after document
448 448
            switch (_currToken.id()) {
449 -
                
449 +
450 450
            case ID_PROPERTY_NAME:
451 451
                return _streamReadContext.currentName().length();
452 452
            case ID_STRING:
@@ -458,7 +458,7 @@
Loading
458 458
            case ID_NUMBER_INT:
459 459
            case ID_NUMBER_FLOAT:
460 460
                return _textBuffer.size();
461 -
                
461 +
462 462
            default:
463 463
                return _currToken.asCharArray().length;
464 464
            }
@@ -756,7 +756,7 @@
Loading
756 756
            _tokenIncomplete = true;
757 757
            _nextToken = JsonToken.VALUE_STRING;
758 758
            return _currToken;
759 -
        }        
759 +
        }
760 760
        JsonToken t;
761 761
762 762
        switch (i) {
@@ -856,7 +856,7 @@
Loading
856 856
        }
857 857
        return (_currToken = _handleUnexpectedValue(i));
858 858
    }
859 -
    
859 +
860 860
    private final JsonToken _nextAfterName()
861 861
    {
862 862
        _nameCopied = false; // need to invalidate if it was copied
@@ -864,7 +864,7 @@
Loading
864 864
        _nextToken = null;
865 865
866 866
 // !!! 16-Nov-2015, tatu: TODO: fix [databind#37], copy next location to current here
867 -
        
867 +
868 868
        // Also: may need to start new context?
869 869
        if (t == JsonToken.START_ARRAY) {
870 870
            _streamReadContext = _streamReadContext.createChildArrayContext(_tokenInputRow, _tokenInputCol);
@@ -1055,7 +1055,7 @@
Loading
1055 1055
            _nextTokenNotInObject(i);
1056 1056
            return false;
1057 1057
        }
1058 -
        
1058 +
1059 1059
        // // // This part differs, name parsing
1060 1060
        _updateNameLocation();
1061 1061
        if (i == INT_QUOTE) {
@@ -1423,7 +1423,7 @@
Loading
1423 1423
            }
1424 1424
            return -1;
1425 1425
        }
1426 -
            
1426 +
1427 1427
        i = input[qptr++] & 0xFF;
1428 1428
        if (codes[i] != 0) {
1429 1429
            if (i != INT_QUOTE) {
@@ -1459,7 +1459,7 @@
Loading
1459 1459
                    if (i != INT_QUOTE) {
1460 1460
                        return -1;
1461 1461
                    }
1462 -
                }                
1462 +
                }
1463 1463
            }
1464 1464
        }
1465 1465
        _quadPtr = qptr;
@@ -1629,7 +1629,7 @@
Loading
1629 1629
    /* Public API, traversal, nextXxxValue() variants
1630 1630
    /**********************************************************************
1631 1631
     */
1632 -
    
1632 +
1633 1633
    @Override
1634 1634
    public String nextTextValue() throws JacksonException
1635 1635
    {
@@ -1918,7 +1918,7 @@
Loading
1918 1918
1919 1919
        // And there we have it!
1920 1920
        return resetInt(negative, intPartLength);
1921 -
        
1921 +
1922 1922
    }
1923 1923
1924 1924
    // Method called when we have seen one zero, and want to ensure
@@ -1947,7 +1947,7 @@
Loading
1947 1947
                    return INT_0;
1948 1948
                }
1949 1949
                ++_inputPtr; // skip previous zeroes
1950 -
                if (ch != INT_0) { // followed by other number; return 
1950 +
                if (ch != INT_0) { // followed by other number; return
1951 1951
                    break;
1952 1952
                }
1953 1953
            }
@@ -2140,7 +2140,7 @@
Loading
2140 2140
                        return findName(q, 3);
2141 2141
                    }
2142 2142
                    return parseName(q, i, 3);
2143 -
                }                
2143 +
                }
2144 2144
                if (i == INT_QUOTE) { // 2 byte/char case or broken
2145 2145
                    return findName(q, 2);
2146 2146
                }
@@ -2150,7 +2150,7 @@
Loading
2150 2150
                return findName(q, 1);
2151 2151
            }
2152 2152
            return parseName(q, i, 1);
2153 -
        }     
2153 +
        }
2154 2154
        if (q == INT_QUOTE) { // special case, ""
2155 2155
            return "";
2156 2156
        }
@@ -2236,7 +2236,7 @@
Loading
2236 2236
        }
2237 2237
        return parseLongName(i, q2, q3);
2238 2238
    }
2239 -
    
2239 +
2240 2240
    protected final String parseLongName(int q, final int q2, int q3) throws JacksonException
2241 2241
    {
2242 2242
        _quadBuffer[0] = _quad1;
@@ -2656,7 +2656,7 @@
Loading
2656 2656
        quads[2] = _padLastQuad(q3, lastQuadBytes);
2657 2657
        return addName(quads, 3, lastQuadBytes);
2658 2658
    }
2659 -
    
2659 +
2660 2660
    private final String findName(int[] quads, int qlen, int lastQuad, int lastQuadBytes)
2661 2661
        throws StreamReadException
2662 2662
    {
@@ -2728,13 +2728,13 @@
Loading
2728 2728
                if ((ix + needed) > byteLen) {
2729 2729
                    _reportInvalidEOF(" in property name", JsonToken.PROPERTY_NAME);
2730 2730
                }
2731 -
                
2731 +
2732 2732
                // Ok, always need at least one more:
2733 2733
                int ch2 = quads[ix >> 2]; // current quad, need to shift+mask
2734 2734
                byteIx = (ix & 3);
2735 2735
                ch2 = (ch2 >> ((3 - byteIx) << 3));
2736 2736
                ++ix;
2737 -
                
2737 +
2738 2738
                if ((ch2 & 0xC0) != 0x080) {
2739 2739
                    _reportInvalidOther(ch2);
2740 2740
                }
@@ -2744,7 +2744,7 @@
Loading
2744 2744
                    byteIx = (ix & 3);
2745 2745
                    ch2 = (ch2 >> ((3 - byteIx) << 3));
2746 2746
                    ++ix;
2747 -
                    
2747 +
2748 2748
                    if ((ch2 & 0xC0) != 0x080) {
2749 2749
                        _reportInvalidOther(ch2);
2750 2750
                    }
@@ -2801,7 +2801,7 @@
Loading
2801 2801
2802 2802
    protected void _finishString() throws JacksonException
2803 2803
    {
2804 -
        // First, single tight loop for ASCII content, not split across input buffer boundary:        
2804 +
        // First, single tight loop for ASCII content, not split across input buffer boundary:
2805 2805
        int ptr = _inputPtr;
2806 2806
        if (ptr >= _inputEnd) {
2807 2807
            _loadMoreGuaranteed();
@@ -2832,7 +2832,7 @@
Loading
2832 2832
2833 2833
    protected String _finishAndReturnString() throws JacksonException
2834 2834
    {
2835 -
        // First, single tight loop for ASCII content, not split across input buffer boundary:        
2835 +
        // First, single tight loop for ASCII content, not split across input buffer boundary:
2836 2836
        int ptr = _inputPtr;
2837 2837
        if (ptr >= _inputEnd) {
2838 2838
            _loadMoreGuaranteed();
@@ -2860,7 +2860,7 @@
Loading
2860 2860
        _finishString2(outBuf, outPtr);
2861 2861
        return _textBuffer.contentsAsString();
2862 2862
    }
2863 -
    
2863 +
2864 2864
    private final void _finishString2(char[] outBuf, int outPtr)
2865 2865
        throws JacksonException
2866 2866
    {
@@ -2987,7 +2987,7 @@
Loading
2987 2987
            if (c == INT_QUOTE) {
2988 2988
                break main_loop;
2989 2989
            }
2990 -
            
2990 +
2991 2991
            switch (codes[c]) {
2992 2992
            case 1: // backslash
2993 2993
                _decodeEscaped();
@@ -3032,7 +3032,7 @@
Loading
3032 3032
         * will be either ',' or ']'. This case, decrements the already incremented _inputPtr
3033 3033
         * in the buffer in case of comma (`,`) so that the existing flow goes back to checking
3034 3034
         * the next token which will be comma again and  it parsing continues.
3035 -
         * Also the case returns NULL as current token in case of ',' or ']'.    
3035 +
         * Also the case returns NULL as current token in case of ',' or ']'.
3036 3036
         */
3037 3037
        case ']':
3038 3038
            if (!_streamReadContext.inArray()) {
@@ -3233,7 +3233,7 @@
Loading
3233 3233
        int ptr = _inputPtr;
3234 3234
        if ((ptr + 3) < _inputEnd) {
3235 3235
            byte[] buf = _inputBuffer;
3236 -
            if ((buf[ptr++] == 'r') 
3236 +
            if ((buf[ptr++] == 'r')
3237 3237
                   && (buf[ptr++] == 'u')
3238 3238
                   && (buf[ptr++] == 'e')) {
3239 3239
                int ch = buf[ptr] & 0xFF;
@@ -3251,7 +3251,7 @@
Loading
3251 3251
        int ptr = _inputPtr;
3252 3252
        if ((ptr + 4) < _inputEnd) {
3253 3253
            byte[] buf = _inputBuffer;
3254 -
            if ((buf[ptr++] == 'a') 
3254 +
            if ((buf[ptr++] == 'a')
3255 3255
                   && (buf[ptr++] == 'l')
3256 3256
                   && (buf[ptr++] == 's')
3257 3257
                   && (buf[ptr++] == 'e')) {
@@ -3270,7 +3270,7 @@
Loading
3270 3270
        int ptr = _inputPtr;
3271 3271
        if ((ptr + 3) < _inputEnd) {
3272 3272
            byte[] buf = _inputBuffer;
3273 -
            if ((buf[ptr++] == 'u') 
3273 +
            if ((buf[ptr++] == 'u')
3274 3274
                   && (buf[ptr++] == 'l')
3275 3275
                   && (buf[ptr++] == 'l')) {
3276 3276
                int ch = buf[ptr] & 0xFF;
@@ -3282,7 +3282,7 @@
Loading
3282 3282
        }
3283 3283
        _matchToken2("null", 1);
3284 3284
    }
3285 -
    
3285 +
3286 3286
    protected final void _matchToken(String matchStr, int i) throws JacksonException
3287 3287
    {
3288 3288
        final int len = matchStr.length();
@@ -3296,7 +3296,7 @@
Loading
3296 3296
            }
3297 3297
            ++_inputPtr;
3298 3298
        } while (++i < len);
3299 -
    
3299 +
3300 3300
        int ch = _inputBuffer[_inputPtr] & 0xFF;
3301 3301
        if (ch >= '0' && ch != ']' && ch != '}') { // expected/allowed chars
3302 3302
            _checkMatchEnd(matchStr, i, ch);
@@ -3313,7 +3313,7 @@
Loading
3313 3313
            }
3314 3314
            ++_inputPtr;
3315 3315
        } while (++i < len);
3316 -
    
3316 +
3317 3317
        // but let's also ensure we either get EOF, or non-alphanum char...
3318 3318
        if (_inputPtr >= _inputEnd && !_loadMore()) {
3319 3319
            return;
@@ -3389,7 +3389,7 @@
Loading
3389 3389
                    _throwInvalidSpace(i);
3390 3390
                }
3391 3391
            }
3392 -
        }        
3392 +
        }
3393 3393
        throw _constructReadException("Unexpected end-of-input within/between "+_streamReadContext.typeDesc()+" entries");
3394 3394
    }
3395 3395
@@ -3420,7 +3420,7 @@
Loading
3420 3420
                _throwInvalidSpace(i);
3421 3421
            }
3422 3422
        }
3423 -
        
3423 +
3424 3424
        while (_inputPtr < _inputEnd) {
3425 3425
            i = _inputBuffer[_inputPtr++] & 0xFF;
3426 3426
            if (i > INT_SPACE) {
@@ -3496,7 +3496,7 @@
Loading
3496 3496
                    if (i == INT_SLASH || i == INT_HASH) {
3497 3497
                        return _skipColon2(true);
3498 3498
                    }
3499 -
                    ++_inputPtr;                    
3499 +
                    ++_inputPtr;
3500 3500
                    return i;
3501 3501
                }
3502 3502
            }
@@ -3679,7 +3679,7 @@
Loading
3679 3679
            }
3680 3680
        }
3681 3681
    }
3682 -
    
3682 +
3683 3683
    @Override
3684 3684
    protected char _decodeEscaped() throws JacksonException
3685 3685
    {
@@ -3739,7 +3739,7 @@
Loading
3739 3739
        int c = firstByte & 0xFF;
3740 3740
        if (c > 0x7F) { // if >= 0, is ascii and fine as is
3741 3741
            int needed;
3742 -
            
3742 +
3743 3743
            // Ok; if we end here, we got multi-byte combination
3744 3744
            if ((c & 0xE0) == 0xC0) { // 2 bytes (0x0080 - 0x07FF)
3745 3745
                c &= 0x1F;
@@ -3761,7 +3761,7 @@
Loading
3761 3761
                _reportInvalidOther(d & 0xFF);
3762 3762
            }
3763 3763
            c = (c << 6) | (d & 0x3F);
3764 -
            
3764 +
3765 3765
            if (needed > 1) { // needed == 1 means 2 bytes total
3766 3766
                d = nextByte(); // 3rd byte
3767 3767
                if ((d & 0xC0) != 0x080) {
@@ -4063,9 +4063,9 @@
Loading
4063 4063
                }
4064 4064
            }
4065 4065
            int decodedData = bits;
4066 -
            
4066 +
4067 4067
            // then second base64 char; can't get padding yet, nor ws
4068 -
            
4068 +
4069 4069
            if (_inputPtr >= _inputEnd) {
4070 4070
                _loadMoreGuaranteed();
4071 4071
            }
@@ -4075,7 +4075,7 @@
Loading
4075 4075
                bits = _decodeBase64Escape(b64variant, ch, 1);
4076 4076
            }
4077 4077
            decodedData = (decodedData << 6) | bits;
4078 -
            
4078 +
4079 4079
            // third base64 char; can be padding, but not ws
4080 4080
            if (_inputPtr >= _inputEnd) {
4081 4081
                _loadMoreGuaranteed();

@@ -19,7 +19,7 @@
Loading
19 19
    /* Configuration
20 20
    /**********************************************************************
21 21
     */
22 -
    
22 +
23 23
    /**
24 24
     * Object consulted to determine whether to write parts of content generator
25 25
     * is asked to write or not.
@@ -61,7 +61,7 @@
Loading
61 61
     * effect when {@link #clearCurrentToken} was called.
62 62
     */
63 63
    protected JsonToken _lastClearedToken;
64 -
    
64 +
65 65
    /**
66 66
     * During traversal this is the actual "open" parse tree, which sometimes
67 67
     * is the same as {@link #_exposedContext}, and at other times is ahead
@@ -82,7 +82,7 @@
Loading
82 82
     * property, and also used for array elements.
83 83
     */
84 84
    protected TokenFilter _itemFilter;
85 -
    
85 +
86 86
    /**
87 87
     * Number of tokens for which {@link TokenFilter#INCLUDE_ALL}
88 88
     * has been returned.
@@ -156,7 +156,7 @@
Loading
156 156
    @Override public final boolean hasToken(JsonToken t) {
157 157
        return (_currToken == t);
158 158
    }
159 -
    
159 +
160 160
    @Override public boolean isExpectedStartArrayToken() { return _currToken == JsonToken.START_ARRAY; }
161 161
    @Override public boolean isExpectedStartObjectToken() { return _currToken == JsonToken.START_OBJECT; }
162 162
@@ -214,7 +214,7 @@
Loading
214 214
        // 23-May-2017, tatu: To be honest, code here is rather hairy and I don't like all
215 215