Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–261 unchanged (261 lines)
262 JsonDeserializer<Object> deser;
263 try {
264 deser = _createDeserializer(ctxt, factory, type);
265 } catch (IllegalArgumentException iae) {
266 // We better only expose checked exceptions, since those
267 // are what caller is expected to handle
268 throw JsonMappingException.from(ctxt, iae.getMessage(), iae);
269 }
270 if (deser == null) {
271 return null;
272 }
273 /* cache resulting deserializer? always true for "plain" BeanDeserializer
274 * (but can be re-defined for sub-classes by using @JsonCachable!)
…lines 275–602 unchanged (328 lines)

After

…lines 1–261 unchanged (261 lines)
262 JsonDeserializer<Object> deser;
263 try {
264 deser = _createDeserializer(ctxt, factory, type);
265 } catch (IllegalArgumentException iae) {
266 // We better only expose checked exceptions, since those
267 // are what caller is expected to handle
268 throw JsonMappingException.from(ctxt, ClassUtil.exceptionMessage(iae), iae);
269 }
270 if (deser == null) {
271 return null;
272 }
273 /* cache resulting deserializer? always true for "plain" BeanDeserializer
274 * (but can be re-defined for sub-classes by using @JsonCachable!)
…lines 275–602 unchanged (328 lines)

Before

program
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "deser"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "HashMap"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "concurrent"
. "."
identifier "ConcurrentHashMap"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "annotation"
. "."
identifier "JsonFormat"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
asterisk
* "*"
; ";"
import_declaration (+22 nodes collapsed)
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "introspect"
. "."
identifier "Annotated"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "type"
. "."
asterisk
* "*"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "util"
. "."
identifier "ClassUtil"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "util"
. "."
identifier "Converter"
; ";"
block_comment "/**\n * Class that defines caching layer between callers (lik"...
class_declaration
modifiers
public "public"
final "final"
class "class"
identifier "DeserializerCache"
super_interfaces
implements "implements"
type_list
scoped_type_identifier
scoped_type_identifier
type_identifier "java"
. "."
type_identifier "io"
. "."
type_identifier "Serializable"
line_comment "// since 2.1 -- needs to be careful tho"
class_body
{ "{"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "serialVersionUID"
= "="
decimal_integer_literal "1L"
; ";"
block_comment "/*\n /****************************************************"...
block_comment "/**\n * We will also cache some dynamically constructed d"...
field_declaration (+44 nodes collapsed)
block_comment "/**\n * During deserializer construction process we may n"...
field_declaration (+40 nodes collapsed)
block_comment "/*\n /****************************************************"...
constructor_declaration
modifiers
public "public"
identifier "DeserializerCache"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
} "}"
block_comment "/*\n /****************************************************"...
method_declaration (+24 nodes collapsed)
block_comment "/*\n /****************************************************"...
block_comment "/**\n * Method that can be used to determine how many des"...
method_declaration (+22 nodes collapsed)
block_comment "/**\n * Method that will drop all dynamically constructed"...
method_declaration
modifiers
public "public"
void_type "void"
identifier "flushCachedDeserializers"
formal_parameters
( "("
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "_cachedDeserializers"
. "."
identifier "clear"
argument_list
( "("
) ")"
; ";"
} "}"
block_comment "/*\n /****************************************************"...
block_comment "/**\n * Method called to get hold of a deserializer for a"...
method_declaration (+105 nodes collapsed)
block_comment "/**\n * Method called to get hold of a deserializer to us"...
method_declaration (+99 nodes collapsed)
block_comment "/**\n * Method called to find out whether provider would "...
method_declaration (+80 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration (+73 nodes collapsed)
block_comment "/**\n * Method that will try to create a deserializer for"...
method_declaration (+188 nodes collapsed)
block_comment "/**\n * Method that handles actual construction (via fact"...
method_declaration
modifiers
protected "protected"
generic_type
type_identifier "JsonDeserializer"
type_arguments
< "<"
type_identifier "Object"
> ">"
identifier "_createAndCache2"
formal_parameters
( "("
formal_parameter
type_identifier "DeserializationContext"
identifier "ctxt"
, ","
formal_parameter
type_identifier "DeserializerFactory"
identifier "factory"
, ","
formal_parameter
type_identifier "JavaType"
identifier "type"
) ")"
throws
throws "throws"
type_identifier "JsonMappingException"
block
{ "{"
local_variable_declaration
generic_type
type_identifier "JsonDeserializer"
type_arguments
< "<"
type_identifier "Object"
> ">"
variable_declarator
identifier "deser"
; ";"
try_statement
try "try"
block
{ "{"
expression_statement
assignment_expression
identifier "deser"
= "="
method_invocation
identifier "_createDeserializer"
argument_list
( "("
identifier "ctxt"
, ","
identifier "factory"
, ","
identifier "type"
) ")"
; ";"
} "}"
catch_clause
catch "catch"
( "("
catch_formal_parameter
catch_type
type_identifier "IllegalArgumentException"
identifier "iae"
) ")"
block
{ "{"
line_comment "// We better only expose checked exceptions, since those"
line_comment "// are what caller is expected to handle"
throw_statement
throw "throw"
method_invocation
identifier "JsonMappingException"
. "."
identifier "from"
argument_list
( "("
identifier "ctxt"
, ","
method_invocation
identifier "iae"
. "."
identifier "getMessage"
argument_list
( "("
) ")"
, ","
identifier "iae"
) ")"
; ";"
} "}"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "deser"
== "=="
null_literal "null"
) ")"
block
{ "{"
return_statement
return "return"
null_literal "null"
; ";"
} "}"
block_comment "/* cache resulting deserializer? always true for \"plain\" Bea"...
line_comment "// 27-Mar-2015, tatu: As per [databind#735], avoid caching t"...
local_variable_declaration (+23 nodes collapsed)
block_comment "/* we will temporarily hold on to all created deserializers "...
block_comment "/* 07-Jun-2010, tatu: Danger: [JACKSON-296] was caused by ac"...
block_comment "/* Need to resolve? Mostly done for bean deserializers; requ"...
if_statement (+51 nodes collapsed)
if_statement (+21 nodes collapsed)
return_statement
return "return"
identifier "deser"
; ";"
} "}"
block_comment "/*\n /****************************************************"...
block_comment "/**\n * Method that does the heavy lifting of checking fo"...
method_declaration (+419 nodes collapsed)
method_declaration (+475 nodes collapsed)
block_comment "/**\n * Helper method called to check if a class or metho"...
method_declaration (+97 nodes collapsed)
block_comment "/**\n * Helper method that will check whether given annot"...
method_declaration (+120 nodes collapsed)
method_declaration (+77 nodes collapsed)
block_comment "/**\n * Method called to see if given method has annotati"...
method_declaration (+431 nodes collapsed)
block_comment "/*\n /****************************************************"...
block_comment "/**\n * Helper method used to prevent both caching and ca"...
method_declaration (+150 nodes collapsed)
method_declaration (+163 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration (+102 nodes collapsed)
method_declaration (+40 nodes collapsed)
} "}"

After

program
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "deser"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "HashMap"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "concurrent"
. "."
identifier "ConcurrentHashMap"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "annotation"
. "."
identifier "JsonFormat"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
asterisk
* "*"
; ";"
import_declaration (+22 nodes collapsed)
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "introspect"
. "."
identifier "Annotated"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "type"
. "."
asterisk
* "*"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "util"
. "."
identifier "ClassUtil"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "util"
. "."
identifier "Converter"
; ";"
block_comment "/**\n * Class that defines caching layer between callers (lik"...
class_declaration
modifiers
public "public"
final "final"
class "class"
identifier "DeserializerCache"
super_interfaces
implements "implements"
type_list
scoped_type_identifier
scoped_type_identifier
type_identifier "java"
. "."
type_identifier "io"
. "."
type_identifier "Serializable"
line_comment "// since 2.1 -- needs to be careful tho"
class_body
{ "{"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "serialVersionUID"
= "="
decimal_integer_literal "1L"
; ";"
block_comment "/*\n /****************************************************"...
block_comment "/**\n * We will also cache some dynamically constructed d"...
field_declaration (+44 nodes collapsed)
block_comment "/**\n * During deserializer construction process we may n"...
field_declaration (+40 nodes collapsed)
block_comment "/*\n /****************************************************"...
constructor_declaration
modifiers
public "public"
identifier "DeserializerCache"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
} "}"
block_comment "/*\n /****************************************************"...
method_declaration (+24 nodes collapsed)
block_comment "/*\n /****************************************************"...
block_comment "/**\n * Method that can be used to determine how many des"...
method_declaration (+22 nodes collapsed)
block_comment "/**\n * Method that will drop all dynamically constructed"...
method_declaration
modifiers
public "public"
void_type "void"
identifier "flushCachedDeserializers"
formal_parameters
( "("
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "_cachedDeserializers"
. "."
identifier "clear"
argument_list
( "("
) ")"
; ";"
} "}"
block_comment "/*\n /****************************************************"...
block_comment "/**\n * Method called to get hold of a deserializer for a"...
method_declaration (+105 nodes collapsed)
block_comment "/**\n * Method called to get hold of a deserializer to us"...
method_declaration (+99 nodes collapsed)
block_comment "/**\n * Method called to find out whether provider would "...
method_declaration (+80 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration (+73 nodes collapsed)
block_comment "/**\n * Method that will try to create a deserializer for"...
method_declaration (+188 nodes collapsed)
block_comment "/**\n * Method that handles actual construction (via fact"...
method_declaration
modifiers
protected "protected"
generic_type
type_identifier "JsonDeserializer"
type_arguments
< "<"
type_identifier "Object"
> ">"
identifier "_createAndCache2"
formal_parameters
( "("
formal_parameter
type_identifier "DeserializationContext"
identifier "ctxt"
, ","
formal_parameter
type_identifier "DeserializerFactory"
identifier "factory"
, ","
formal_parameter
type_identifier "JavaType"
identifier "type"
) ")"
throws
throws "throws"
type_identifier "JsonMappingException"
block
{ "{"
local_variable_declaration
generic_type
type_identifier "JsonDeserializer"
type_arguments
< "<"
type_identifier "Object"
> ">"
variable_declarator
identifier "deser"
; ";"
try_statement
try "try"
block
{ "{"
expression_statement
assignment_expression
identifier "deser"
= "="
method_invocation
identifier "_createDeserializer"
argument_list
( "("
identifier "ctxt"
, ","
identifier "factory"
, ","
identifier "type"
) ")"
; ";"
} "}"
catch_clause
catch "catch"
( "("
catch_formal_parameter
catch_type
type_identifier "IllegalArgumentException"
identifier "iae"
) ")"
block
{ "{"
line_comment "// We better only expose checked exceptions, since those"
line_comment "// are what caller is expected to handle"
throw_statement
throw "throw"
method_invocation
identifier "JsonMappingException"
. "."
identifier "from"
argument_list
( "("
identifier "ctxt"
, ","
method_invocation
identifier "ClassUtil"
. "."
identifier "exceptionMessage"
argument_list
( "("
identifier "iae"
) ")"
, ","
identifier "iae"
) ")"
; ";"
} "}"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "deser"
== "=="
null_literal "null"
) ")"
block
{ "{"
return_statement
return "return"
null_literal "null"
; ";"
} "}"
block_comment "/* cache resulting deserializer? always true for \"plain\" Bea"...
line_comment "// 27-Mar-2015, tatu: As per [databind#735], avoid caching t"...
local_variable_declaration (+23 nodes collapsed)
block_comment "/* we will temporarily hold on to all created deserializers "...
block_comment "/* 07-Jun-2010, tatu: Danger: [JACKSON-296] was caused by ac"...
block_comment "/* Need to resolve? Mostly done for bean deserializers; requ"...
if_statement (+51 nodes collapsed)
if_statement (+21 nodes collapsed)
return_statement
return "return"
identifier "deser"
; ";"
} "}"
block_comment "/*\n /****************************************************"...
block_comment "/**\n * Method that does the heavy lifting of checking fo"...
method_declaration (+419 nodes collapsed)
method_declaration (+475 nodes collapsed)
block_comment "/**\n * Helper method called to check if a class or metho"...
method_declaration (+97 nodes collapsed)
block_comment "/**\n * Helper method that will check whether given annot"...
method_declaration (+120 nodes collapsed)
method_declaration (+77 nodes collapsed)
block_comment "/**\n * Method called to see if given method has annotati"...
method_declaration (+431 nodes collapsed)
block_comment "/*\n /****************************************************"...
block_comment "/**\n * Helper method used to prevent both caching and ca"...
method_declaration (+150 nodes collapsed)
method_declaration (+163 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration (+102 nodes collapsed)
method_declaration (+40 nodes collapsed)
} "}"