@@ -134,14 +134,14 @@ public BaseNodeDeserializer(Class<T> vc) {
134134 }
135135
136136 @ Override
137- public Object deserializeWithType (JsonParser jp , DeserializationContext ctxt ,
137+ public Object deserializeWithType (JsonParser p , DeserializationContext ctxt ,
138138 TypeDeserializer typeDeserializer )
139139 throws IOException
140140 {
141141 /* Output can be as JSON Object, Array or scalar: no way to know
142142 * a priori. So:
143143 */
144- return typeDeserializer .deserializeTypedFromAny (jp , ctxt );
144+ return typeDeserializer .deserializeTypedFromAny (p , ctxt );
145145 }
146146
147147 /* 07-Nov-2014, tatu: When investigating [databind#604], realized that it makes
@@ -157,8 +157,8 @@ public Object deserializeWithType(JsonParser jp, DeserializationContext ctxt,
157157 /**********************************************************
158158 */
159159
160- protected void _reportProblem (JsonParser jp , String msg ) throws JsonMappingException {
161- throw new JsonMappingException (msg , jp .getTokenLocation ());
160+ protected void _reportProblem (JsonParser p , String msg ) throws JsonMappingException {
161+ throw new JsonMappingException (msg , p .getTokenLocation ());
162162 }
163163
164164 /**
@@ -187,15 +187,15 @@ protected void _handleDuplicateField(String fieldName, ObjectNode objectNode,
187187 * was added
188188 * @param newValue Newly added value just added to the object node
189189 */
190- protected void _handleDuplicateField (JsonParser jp , DeserializationContext ctxt ,
190+ protected void _handleDuplicateField (JsonParser p , DeserializationContext ctxt ,
191191 JsonNodeFactory nodeFactory ,
192192 String fieldName , ObjectNode objectNode ,
193193 JsonNode oldValue , JsonNode newValue )
194194 throws JsonProcessingException
195195 {
196196 // [Issue#237]: Report an error if asked to do so:
197197 if (ctxt .isEnabled (DeserializationFeature .FAIL_ON_READING_DUP_TREE_KEY )) {
198- _reportProblem (jp , "Duplicate field '" +fieldName +"' for ObjectNode: not allowed when FAIL_ON_READING_DUP_TREE_KEY enabled" );
198+ _reportProblem (p , "Duplicate field '" +fieldName +"' for ObjectNode: not allowed when FAIL_ON_READING_DUP_TREE_KEY enabled" );
199199 }
200200 // Backwards-compatibility; call in case it's overloaded
201201 _handleDuplicateField (fieldName , objectNode , oldValue , newValue );
@@ -207,30 +207,30 @@ protected void _handleDuplicateField(JsonParser jp, DeserializationContext ctxt,
207207 /**********************************************************
208208 */
209209
210- protected final ObjectNode deserializeObject (JsonParser jp , DeserializationContext ctxt ,
210+ protected final ObjectNode deserializeObject (JsonParser p , DeserializationContext ctxt ,
211211 final JsonNodeFactory nodeFactory ) throws IOException
212212 {
213213 ObjectNode node = nodeFactory .objectNode ();
214- JsonToken t = jp .getCurrentToken ();
214+ JsonToken t = p .getCurrentToken ();
215215 if (t == JsonToken .START_OBJECT ) {
216- t = jp .nextToken ();
216+ t = p .nextToken ();
217217 }
218- for (; t == JsonToken .FIELD_NAME ; t = jp .nextToken ()) {
219- String fieldName = jp .getCurrentName ();
218+ for (; t == JsonToken .FIELD_NAME ; t = p .nextToken ()) {
219+ String fieldName = p .getCurrentName ();
220220 JsonNode value ;
221- t = jp .nextToken ();
221+ t = p .nextToken ();
222222 switch (t .id ()) {
223223 case JsonTokenId .ID_START_OBJECT :
224- value = deserializeObject (jp , ctxt , nodeFactory );
224+ value = deserializeObject (p , ctxt , nodeFactory );
225225 break ;
226226 case JsonTokenId .ID_START_ARRAY :
227- value = deserializeArray (jp , ctxt , nodeFactory );
227+ value = deserializeArray (p , ctxt , nodeFactory );
228228 break ;
229229 case JsonTokenId .ID_STRING :
230- value = nodeFactory .textNode (jp .getText ());
230+ value = nodeFactory .textNode (p .getText ());
231231 break ;
232232 case JsonTokenId .ID_NUMBER_INT :
233- value = _fromInt (jp , ctxt , nodeFactory );
233+ value = _fromInt (p , ctxt , nodeFactory );
234234 break ;
235235 case JsonTokenId .ID_TRUE :
236236 value = nodeFactory .booleanNode (true );
@@ -242,40 +242,40 @@ protected final ObjectNode deserializeObject(JsonParser jp, DeserializationConte
242242 value = nodeFactory .nullNode ();
243243 break ;
244244 default :
245- value = deserializeAny (jp , ctxt , nodeFactory );
245+ value = deserializeAny (p , ctxt , nodeFactory );
246246 }
247247 JsonNode old = node .replace (fieldName , value );
248248 if (old != null ) {
249- _handleDuplicateField (jp , ctxt , nodeFactory ,
249+ _handleDuplicateField (p , ctxt , nodeFactory ,
250250 fieldName , node , old , value );
251251 }
252252 }
253253 return node ;
254254 }
255255
256- protected final ArrayNode deserializeArray (JsonParser jp , DeserializationContext ctxt ,
256+ protected final ArrayNode deserializeArray (JsonParser p , DeserializationContext ctxt ,
257257 final JsonNodeFactory nodeFactory ) throws IOException
258258 {
259259 ArrayNode node = nodeFactory .arrayNode ();
260260 while (true ) {
261- JsonToken t = jp .nextToken ();
261+ JsonToken t = p .nextToken ();
262262 if (t == null ) {
263263 throw ctxt .mappingException ("Unexpected end-of-input when binding data into ArrayNode" );
264264 }
265265 switch (t .id ()) {
266266 case JsonTokenId .ID_START_OBJECT :
267- node .add (deserializeObject (jp , ctxt , nodeFactory ));
267+ node .add (deserializeObject (p , ctxt , nodeFactory ));
268268 break ;
269269 case JsonTokenId .ID_START_ARRAY :
270- node .add (deserializeArray (jp , ctxt , nodeFactory ));
270+ node .add (deserializeArray (p , ctxt , nodeFactory ));
271271 break ;
272272 case JsonTokenId .ID_END_ARRAY :
273273 return node ;
274274 case JsonTokenId .ID_STRING :
275- node .add (nodeFactory .textNode (jp .getText ()));
275+ node .add (nodeFactory .textNode (p .getText ()));
276276 break ;
277277 case JsonTokenId .ID_NUMBER_INT :
278- node .add (_fromInt (jp , ctxt , nodeFactory ));
278+ node .add (_fromInt (p , ctxt , nodeFactory ));
279279 break ;
280280 case JsonTokenId .ID_TRUE :
281281 node .add (nodeFactory .booleanNode (true ));
@@ -287,31 +287,31 @@ protected final ArrayNode deserializeArray(JsonParser jp, DeserializationContext
287287 node .add (nodeFactory .nullNode ());
288288 break ;
289289 default :
290- node .add (deserializeAny (jp , ctxt , nodeFactory ));
290+ node .add (deserializeAny (p , ctxt , nodeFactory ));
291291 break ;
292292 }
293293 }
294294 }
295295
296- protected final JsonNode deserializeAny (JsonParser jp , DeserializationContext ctxt ,
296+ protected final JsonNode deserializeAny (JsonParser p , DeserializationContext ctxt ,
297297 final JsonNodeFactory nodeFactory ) throws IOException
298298 {
299- switch (jp .getCurrentTokenId ()) {
299+ switch (p .getCurrentTokenId ()) {
300300 case JsonTokenId .ID_START_OBJECT :
301301 case JsonTokenId .ID_END_OBJECT : // for empty JSON Objects we may point to this
302- return deserializeObject (jp , ctxt , nodeFactory );
302+ return deserializeObject (p , ctxt , nodeFactory );
303303 case JsonTokenId .ID_START_ARRAY :
304- return deserializeArray (jp , ctxt , nodeFactory );
304+ return deserializeArray (p , ctxt , nodeFactory );
305305 case JsonTokenId .ID_FIELD_NAME :
306- return deserializeObject (jp , ctxt , nodeFactory );
306+ return deserializeObject (p , ctxt , nodeFactory );
307307 case JsonTokenId .ID_EMBEDDED_OBJECT :
308- return _fromEmbedded (jp , ctxt , nodeFactory );
308+ return _fromEmbedded (p , ctxt , nodeFactory );
309309 case JsonTokenId .ID_STRING :
310- return nodeFactory .textNode (jp .getText ());
310+ return nodeFactory .textNode (p .getText ());
311311 case JsonTokenId .ID_NUMBER_INT :
312- return _fromInt (jp , ctxt , nodeFactory );
312+ return _fromInt (p , ctxt , nodeFactory );
313313 case JsonTokenId .ID_NUMBER_FLOAT :
314- return _fromFloat (jp , ctxt , nodeFactory );
314+ return _fromFloat (p , ctxt , nodeFactory );
315315 case JsonTokenId .ID_TRUE :
316316 return nodeFactory .booleanNode (true );
317317 case JsonTokenId .ID_FALSE :
@@ -329,36 +329,36 @@ protected final JsonNode deserializeAny(JsonParser jp, DeserializationContext ct
329329 }
330330 }
331331
332- protected final JsonNode _fromInt (JsonParser jp , DeserializationContext ctxt ,
332+ protected final JsonNode _fromInt (JsonParser p , DeserializationContext ctxt ,
333333 JsonNodeFactory nodeFactory ) throws IOException
334334 {
335- JsonParser .NumberType nt = jp .getNumberType ();
335+ JsonParser .NumberType nt = p .getNumberType ();
336336 if (nt == JsonParser .NumberType .BIG_INTEGER
337337 || ctxt .isEnabled (DeserializationFeature .USE_BIG_INTEGER_FOR_INTS )) {
338- return nodeFactory .numberNode (jp .getBigIntegerValue ());
338+ return nodeFactory .numberNode (p .getBigIntegerValue ());
339339 }
340340 if (nt == JsonParser .NumberType .INT ) {
341- return nodeFactory .numberNode (jp .getIntValue ());
341+ return nodeFactory .numberNode (p .getIntValue ());
342342 }
343- return nodeFactory .numberNode (jp .getLongValue ());
343+ return nodeFactory .numberNode (p .getLongValue ());
344344 }
345345
346- protected final JsonNode _fromFloat (JsonParser jp , DeserializationContext ctxt ,
346+ protected final JsonNode _fromFloat (JsonParser p , DeserializationContext ctxt ,
347347 final JsonNodeFactory nodeFactory ) throws IOException
348348 {
349- JsonParser .NumberType nt = jp .getNumberType ();
349+ JsonParser .NumberType nt = p .getNumberType ();
350350 if (nt == JsonParser .NumberType .BIG_DECIMAL
351351 || ctxt .isEnabled (DeserializationFeature .USE_BIG_DECIMAL_FOR_FLOATS )) {
352- return nodeFactory .numberNode (jp .getDecimalValue ());
352+ return nodeFactory .numberNode (p .getDecimalValue ());
353353 }
354- return nodeFactory .numberNode (jp .getDoubleValue ());
354+ return nodeFactory .numberNode (p .getDoubleValue ());
355355 }
356356
357- protected final JsonNode _fromEmbedded (JsonParser jp , DeserializationContext ctxt ,
357+ protected final JsonNode _fromEmbedded (JsonParser p , DeserializationContext ctxt ,
358358 JsonNodeFactory nodeFactory ) throws IOException
359359 {
360360 // [JACKSON-796]
361- Object ob = jp .getEmbeddedObject ();
361+ Object ob = p .getEmbeddedObject ();
362362 if (ob == null ) { // should this occur?
363363 return nodeFactory .nullNode ();
364364 }
0 commit comments