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–177 unchanged (177 lines)
178 * Disabling the check will break 2 Enum-related tests.
179 */
180 // 19-Jun-2016, tatu: As per [databind#1270] we may actually get full
181 // generic type with custom type resolvers. If so, should try to retain them.
182 // Whether this is sufficient to avoid problems remains to be seen, but for
183 // now it should improve things.
184 type = ctxt.getTypeFactory().constructSpecializedType(_baseType, type.getRawClass());
185 }
186 deser = ctxt.findContextualValueDeserializer(type, _property);
187 }
188 _deserializers.put(typeId, deser);
189 }
190 return deser;
191 }
…lines 192–288 unchanged (97 lines)

After

…lines 1–177 unchanged (177 lines)
178 * Disabling the check will break 2 Enum-related tests.
179 */
180 // 19-Jun-2016, tatu: As per [databind#1270] we may actually get full
181 // generic type with custom type resolvers. If so, should try to retain them.
182 // Whether this is sufficient to avoid problems remains to be seen, but for
183 // now it should improve things.
184 if (!type.hasGenericTypes()) {
185 type = ctxt.getTypeFactory().constructSpecializedType(_baseType, type.getRawClass());
186 }
187 }
188 deser = ctxt.findContextualValueDeserializer(type, _property);
189 }
190 _deserializers.put(typeId, deser);
191 }
192 return deser;
…lines 193–290 unchanged (98 lines)

Before

program
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "jsontype"
. "."
identifier "impl"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "IOException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Map"
; ";"
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 "JsonTypeInfo"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "core"
. "."
asterisk
* "*"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "BeanProperty"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "DeserializationContext"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "DeserializationFeature"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "JavaType"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "JsonDeserializer"
; ";"
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 "jsontype"
. "."
identifier "TypeDeserializer"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "jsontype"
. "."
identifier "TypeIdResolver"
; ";"
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"
; ";"
block_comment "/**\n * Base class for all standard Jackson {@link TypeDeseri"...
class_declaration
modifiers
public "public"
abstract "abstract"
class "class"
identifier "TypeDeserializerBase"
superclass
extends "extends"
type_identifier "TypeDeserializer"
super_interfaces
implements "implements"
type_list
scoped_type_identifier
scoped_type_identifier
type_identifier "java"
. "."
type_identifier "io"
. "."
type_identifier "Serializable"
class_body
{ "{"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "serialVersionUID"
= "="
decimal_integer_literal "1"
; ";"
field_declaration
modifiers
protected "protected"
final "final"
type_identifier "TypeIdResolver"
variable_declarator
identifier "_idResolver"
; ";"
field_declaration
modifiers
protected "protected"
final "final"
type_identifier "JavaType"
variable_declarator
identifier "_baseType"
; ";"
block_comment "/**\n * Property that contains value for which type infor"...
field_declaration
modifiers
protected "protected"
final "final"
type_identifier "BeanProperty"
variable_declarator
identifier "_property"
; ";"
block_comment "/**\n * Type to use as the default implementation, if typ"...
field_declaration
modifiers
protected "protected"
final "final"
type_identifier "JavaType"
variable_declarator
identifier "_defaultImpl"
; ";"
block_comment "/**\n * Name of type property used; needed for non-proper"...
field_declaration
modifiers
protected "protected"
final "final"
type_identifier "String"
variable_declarator
identifier "_typePropertyName"
; ";"
field_declaration
modifiers
protected "protected"
final "final"
boolean_type "boolean"
variable_declarator
identifier "_typeIdVisible"
; ";"
block_comment "/**\n * For efficient operation we will lazily build mapp"...
field_declaration
modifiers
protected "protected"
final "final"
generic_type
type_identifier "Map"
type_arguments
< "<"
type_identifier "String"
, ","
generic_type
type_identifier "JsonDeserializer"
type_arguments
< "<"
type_identifier "Object"
> ">"
> ">"
variable_declarator
identifier "_deserializers"
; ";"
field_declaration
modifiers
protected "protected"
generic_type
type_identifier "JsonDeserializer"
type_arguments
< "<"
type_identifier "Object"
> ">"
variable_declarator
identifier "_defaultImplDeserializer"
; ";"
block_comment "/*\n /****************************************************"...
block_comment "/**\n * @since 2.8\n */"
constructor_declaration (+108 nodes collapsed)
constructor_declaration (+86 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
abstract "abstract"
type_identifier "TypeDeserializer"
identifier "forProperty"
formal_parameters
( "("
formal_parameter
type_identifier "BeanProperty"
identifier "prop"
) ")"
; ";"
block_comment "/*\n /****************************************************"...
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
abstract "abstract"
scoped_type_identifier
type_identifier "JsonTypeInfo"
. "."
type_identifier "As"
identifier "getTypeInclusion"
formal_parameters
( "("
) ")"
; ";"
method_declaration (+27 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
final "final"
type_identifier "String"
identifier "getPropertyName"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "_typePropertyName"
; ";"
} "}"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
type_identifier "TypeIdResolver"
identifier "getTypeIdResolver"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "_idResolver"
; ";"
} "}"
method_declaration (+41 nodes collapsed)
method_declaration (+113 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration
modifiers
protected "protected"
final "final"
generic_type
type_identifier "JsonDeserializer"
type_arguments
< "<"
type_identifier "Object"
> ">"
identifier "_findDeserializer"
formal_parameters
( "("
formal_parameter
type_identifier "DeserializationContext"
identifier "ctxt"
, ","
formal_parameter
type_identifier "String"
identifier "typeId"
) ")"
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
local_variable_declaration
generic_type
type_identifier "JsonDeserializer"
type_arguments
< "<"
type_identifier "Object"
> ">"
variable_declarator
identifier "deser"
= "="
method_invocation
identifier "_deserializers"
. "."
identifier "get"
argument_list
( "("
identifier "typeId"
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "deser"
== "=="
null_literal "null"
) ")"
block
{ "{"
block_comment "/* As per [Databind#305], need to provide contextual info. B"...
local_variable_declaration
type_identifier "JavaType"
variable_declarator
identifier "type"
= "="
method_invocation
identifier "_idResolver"
. "."
identifier "typeFromId"
argument_list
( "("
identifier "ctxt"
, ","
identifier "typeId"
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "type"
== "=="
null_literal "null"
) ")"
block (+80 nodes collapsed)
else "else"
block
{ "{"
block_comment "/* 16-Dec-2010, tatu: Since nominal type we get here has no "...
if_statement
if "if"
parenthesized_expression (+28 nodes collapsed)
block
{ "{"
block_comment "/* 09-Aug-2015, tatu: Not sure if the second part of the che"...
line_comment "// 19-Jun-2016, tatu: As per [databind#1270] we may actually"...
line_comment "// generic type with custom type resolvers. If so, should "...
line_comment "// Whether this is sufficient to avoid problems remains to "...
line_comment "// now it should improve things."
expression_statement (+27 nodes collapsed)
} "}"
expression_statement
assignment_expression
identifier "deser"
= "="
method_invocation
identifier "ctxt"
. "."
identifier "findContextualValueDeserializer"
argument_list
( "("
identifier "type"
, ","
identifier "_property"
) ")"
; ";"
} "}"
expression_statement
method_invocation
identifier "_deserializers"
. "."
identifier "put"
argument_list
( "("
identifier "typeId"
, ","
identifier "deser"
) ")"
; ";"
} "}"
return_statement
return "return"
identifier "deser"
; ";"
} "}"
method_declaration (+150 nodes collapsed)
block_comment "/**\n * Helper method called when {@link JsonParser} indi"...
method_declaration (+43 nodes collapsed)
block_comment "/**\n * Helper method called when {@link JsonParser} indi"...
method_declaration (+147 nodes collapsed)
block_comment "/**\n * Helper method called when given type id can not b"...
method_declaration (+129 nodes collapsed)
} "}"

After

program
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "jsontype"
. "."
identifier "impl"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "IOException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Map"
; ";"
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 "JsonTypeInfo"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "core"
. "."
asterisk
* "*"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "BeanProperty"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "DeserializationContext"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "DeserializationFeature"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "JavaType"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "JsonDeserializer"
; ";"
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 "jsontype"
. "."
identifier "TypeDeserializer"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "jsontype"
. "."
identifier "TypeIdResolver"
; ";"
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"
; ";"
block_comment "/**\n * Base class for all standard Jackson {@link TypeDeseri"...
class_declaration
modifiers
public "public"
abstract "abstract"
class "class"
identifier "TypeDeserializerBase"
superclass
extends "extends"
type_identifier "TypeDeserializer"
super_interfaces
implements "implements"
type_list
scoped_type_identifier
scoped_type_identifier
type_identifier "java"
. "."
type_identifier "io"
. "."
type_identifier "Serializable"
class_body
{ "{"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "serialVersionUID"
= "="
decimal_integer_literal "1"
; ";"
field_declaration
modifiers
protected "protected"
final "final"
type_identifier "TypeIdResolver"
variable_declarator
identifier "_idResolver"
; ";"
field_declaration
modifiers
protected "protected"
final "final"
type_identifier "JavaType"
variable_declarator
identifier "_baseType"
; ";"
block_comment "/**\n * Property that contains value for which type infor"...
field_declaration
modifiers
protected "protected"
final "final"
type_identifier "BeanProperty"
variable_declarator
identifier "_property"
; ";"
block_comment "/**\n * Type to use as the default implementation, if typ"...
field_declaration
modifiers
protected "protected"
final "final"
type_identifier "JavaType"
variable_declarator
identifier "_defaultImpl"
; ";"
block_comment "/**\n * Name of type property used; needed for non-proper"...
field_declaration
modifiers
protected "protected"
final "final"
type_identifier "String"
variable_declarator
identifier "_typePropertyName"
; ";"
field_declaration
modifiers
protected "protected"
final "final"
boolean_type "boolean"
variable_declarator
identifier "_typeIdVisible"
; ";"
block_comment "/**\n * For efficient operation we will lazily build mapp"...
field_declaration
modifiers
protected "protected"
final "final"
generic_type
type_identifier "Map"
type_arguments
< "<"
type_identifier "String"
, ","
generic_type
type_identifier "JsonDeserializer"
type_arguments
< "<"
type_identifier "Object"
> ">"
> ">"
variable_declarator
identifier "_deserializers"
; ";"
field_declaration
modifiers
protected "protected"
generic_type
type_identifier "JsonDeserializer"
type_arguments
< "<"
type_identifier "Object"
> ">"
variable_declarator
identifier "_defaultImplDeserializer"
; ";"
block_comment "/*\n /****************************************************"...
block_comment "/**\n * @since 2.8\n */"
constructor_declaration (+108 nodes collapsed)
constructor_declaration (+86 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
abstract "abstract"
type_identifier "TypeDeserializer"
identifier "forProperty"
formal_parameters
( "("
formal_parameter
type_identifier "BeanProperty"
identifier "prop"
) ")"
; ";"
block_comment "/*\n /****************************************************"...
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
abstract "abstract"
scoped_type_identifier
type_identifier "JsonTypeInfo"
. "."
type_identifier "As"
identifier "getTypeInclusion"
formal_parameters
( "("
) ")"
; ";"
method_declaration (+27 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
final "final"
type_identifier "String"
identifier "getPropertyName"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "_typePropertyName"
; ";"
} "}"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
type_identifier "TypeIdResolver"
identifier "getTypeIdResolver"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "_idResolver"
; ";"
} "}"
method_declaration (+41 nodes collapsed)
method_declaration (+113 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration
modifiers
protected "protected"
final "final"
generic_type
type_identifier "JsonDeserializer"
type_arguments
< "<"
type_identifier "Object"
> ">"
identifier "_findDeserializer"
formal_parameters
( "("
formal_parameter
type_identifier "DeserializationContext"
identifier "ctxt"
, ","
formal_parameter
type_identifier "String"
identifier "typeId"
) ")"
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
local_variable_declaration
generic_type
type_identifier "JsonDeserializer"
type_arguments
< "<"
type_identifier "Object"
> ">"
variable_declarator
identifier "deser"
= "="
method_invocation
identifier "_deserializers"
. "."
identifier "get"
argument_list
( "("
identifier "typeId"
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "deser"
== "=="
null_literal "null"
) ")"
block
{ "{"
block_comment "/* As per [Databind#305], need to provide contextual info. B"...
local_variable_declaration
type_identifier "JavaType"
variable_declarator
identifier "type"
= "="
method_invocation
identifier "_idResolver"
. "."
identifier "typeFromId"
argument_list
( "("
identifier "ctxt"
, ","
identifier "typeId"
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "type"
== "=="
null_literal "null"
) ")"
block (+80 nodes collapsed)
else "else"
block
{ "{"
block_comment "/* 16-Dec-2010, tatu: Since nominal type we get here has no "...
if_statement
if "if"
parenthesized_expression (+28 nodes collapsed)
block
{ "{"
block_comment "/* 09-Aug-2015, tatu: Not sure if the second part of the che"...
line_comment "// 19-Jun-2016, tatu: As per [databind#1270] we may actually"...
line_comment "// generic type with custom type resolvers. If so, should "...
line_comment "// Whether this is sufficient to avoid problems remains to "...
line_comment "// now it should improve things."
if_statement
if "if"
parenthesized_expression
( "("
unary_expression
! "!"
method_invocation
identifier "type"
. "."
identifier "hasGenericTypes"
argument_list
( "("
) ")"
) ")"
block
{ "{"
expression_statement (+27 nodes collapsed)
} "}"
} "}"
expression_statement
assignment_expression
identifier "deser"
= "="
method_invocation
identifier "ctxt"
. "."
identifier "findContextualValueDeserializer"
argument_list
( "("
identifier "type"
, ","
identifier "_property"
) ")"
; ";"
} "}"
expression_statement
method_invocation
identifier "_deserializers"
. "."
identifier "put"
argument_list
( "("
identifier "typeId"
, ","
identifier "deser"
) ")"
; ";"
} "}"
return_statement
return "return"
identifier "deser"
; ";"
} "}"
method_declaration (+150 nodes collapsed)
block_comment "/**\n * Helper method called when {@link JsonParser} indi"...
method_declaration (+43 nodes collapsed)
block_comment "/**\n * Helper method called when {@link JsonParser} indi"...
method_declaration (+147 nodes collapsed)
block_comment "/**\n * Helper method called when given type id can not b"...
method_declaration (+129 nodes collapsed)
} "}"