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–188 unchanged (188 lines)
189 } catch (ClassNotFoundException e) { // let caller handle this problem
190 return null;
191 } catch (Exception e) {
192 throw invalidTypeIdException(baseType, subClass, String.format(
193 "problem: (%s) %s",
194 e.getClass().getName(),
195 e.getMessage()));
196 }
197 if (baseType.isTypeOrSuperTypeOf(cls)) {
198 return getTypeFactory().constructSpecializedType(baseType, cls);
199 }
200 }
201 throw invalidTypeIdException(baseType, subClass, "Not a subtype");
…lines 202–377 unchanged (176 lines)

After

…lines 1–188 unchanged (188 lines)
189 } catch (ClassNotFoundException e) { // let caller handle this problem
190 return null;
191 } catch (Exception e) {
192 throw invalidTypeIdException(baseType, subClass, String.format(
193 "problem: (%s) %s",
194 e.getClass().getName(),
195 ClassUtil.exceptionMessage(e)));
196 }
197 if (baseType.isTypeOrSuperTypeOf(cls)) {
198 return getTypeFactory().constructSpecializedType(baseType, cls);
199 }
200 }
201 throw invalidTypeIdException(baseType, subClass, "Not a subtype");
…lines 202–377 unchanged (176 lines)

Before

program
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "lang"
. "."
identifier "reflect"
. "."
identifier "Type"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Locale"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "TimeZone"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "annotation"
. "."
asterisk
* "*"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "cfg"
. "."
identifier "HandlerInstantiator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "cfg"
. "."
identifier "MapperConfig"
; ";"
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
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "introspect"
. "."
identifier "ObjectIdInfo"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "type"
. "."
identifier "TypeFactory"
; ";"
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 * Shared base class for {@link DeserializationContext} "...
class_declaration
modifiers
public "public"
abstract "abstract"
class "class"
identifier "DatabindContext"
class_body
{ "{"
block_comment "/**\n * Let's limit length of error messages, for cases w"...
field_declaration
modifiers
private "private"
final "final"
static "static"
integral_type
int "int"
variable_declarator
identifier "MAX_ERROR_STR_LEN"
= "="
decimal_integer_literal "500"
; ";"
block_comment "/*\n /****************************************************"...
block_comment "/**\n * Accessor to currently active configuration (both "...
method_declaration
modifiers
public "public"
abstract "abstract"
generic_type
type_identifier "MapperConfig"
type_arguments
< "<"
wildcard
? "?"
> ">"
identifier "getConfig"
formal_parameters
( "("
) ")"
; ";"
block_comment "/**\n * Convenience method for accessing serialization vi"...
method_declaration
modifiers
public "public"
abstract "abstract"
type_identifier "AnnotationIntrospector"
identifier "getAnnotationIntrospector"
formal_parameters
( "("
) ")"
; ";"
block_comment "/*\n /****************************************************"...
block_comment "/**\n * Convenience method for checking whether specified"...
method_declaration
modifiers
public "public"
abstract "abstract"
boolean_type "boolean"
identifier "isEnabled"
formal_parameters
( "("
formal_parameter
type_identifier "MapperFeature"
identifier "feature"
) ")"
; ";"
block_comment "/**\n * Convenience method for accessing serialization vi"...
method_declaration
modifiers
public "public"
abstract "abstract"
boolean_type "boolean"
identifier "canOverrideAccessModifiers"
formal_parameters
( "("
) ")"
; ";"
block_comment "/**\n * Accessor for locating currently active view, if a"...
method_declaration
modifiers
public "public"
abstract "abstract"
generic_type
type_identifier "Class"
type_arguments
< "<"
wildcard
? "?"
> ">"
identifier "getActiveView"
formal_parameters
( "("
) ")"
; ";"
block_comment "/**\n * @since 2.6\n */"
method_declaration
modifiers
public "public"
abstract "abstract"
type_identifier "Locale"
identifier "getLocale"
formal_parameters
( "("
) ")"
; ";"
block_comment "/**\n * @since 2.6\n */"
method_declaration
modifiers
public "public"
abstract "abstract"
type_identifier "TimeZone"
identifier "getTimeZone"
formal_parameters
( "("
) ")"
; ";"
block_comment "/**\n * @since 2.7\n */"
method_declaration (+22 nodes collapsed)
block_comment "/*\n /****************************************************"...
block_comment "/**\n * Method for accessing attributes available in this"...
method_declaration
modifiers
public "public"
abstract "abstract"
type_identifier "Object"
identifier "getAttribute"
formal_parameters
( "("
formal_parameter
type_identifier "Object"
identifier "key"
) ")"
; ";"
block_comment "/**\n * Method for setting per-call value of given attrib"...
method_declaration
modifiers
public "public"
abstract "abstract"
type_identifier "DatabindContext"
identifier "setAttribute"
formal_parameters
( "("
formal_parameter
type_identifier "Object"
identifier "key"
, ","
formal_parameter
type_identifier "Object"
identifier "value"
) ")"
; ";"
block_comment "/*\n /****************************************************"...
block_comment "/**\n * Convenience method for constructing {@link JavaTy"...
method_declaration (+45 nodes collapsed)
block_comment "/**\n * Convenience method for constructing subtypes, ret"...
method_declaration (+64 nodes collapsed)
block_comment "/**\n * Lookup method called when code needs to resolve c"...
method_declaration
modifiers
public "public"
type_identifier "JavaType"
identifier "resolveSubType"
formal_parameters
( "("
formal_parameter
type_identifier "JavaType"
identifier "baseType"
, ","
formal_parameter
type_identifier "String"
identifier "subClass"
) ")"
throws
throws "throws"
type_identifier "JsonMappingException"
block
{ "{"
line_comment "// 30-Jan-2010, tatu: Most ids are basic class names; so let"...
line_comment "// check if any generics info is added; and only then ask"...
line_comment "// to do translation when necessary"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
method_invocation
identifier "subClass"
. "."
identifier "indexOf"
argument_list
( "("
character_literal "'<'"
) ")"
> ">"
decimal_integer_literal "0"
) ")"
block (+51 nodes collapsed)
else "else"
block
{ "{"
local_variable_declaration
generic_type
type_identifier "Class"
type_arguments
< "<"
wildcard
? "?"
> ">"
variable_declarator
identifier "cls"
; ";"
try_statement
try "try"
block
{ "{"
expression_statement
assignment_expression
identifier "cls"
= "="
method_invocation
method_invocation
identifier "getTypeFactory"
argument_list
( "("
) ")"
. "."
identifier "findClass"
argument_list
( "("
identifier "subClass"
) ")"
; ";"
} "}"
catch_clause
catch "catch"
( "("
catch_formal_parameter
catch_type
type_identifier "ClassNotFoundException"
identifier "e"
) ")"
block
{ "{"
line_comment "// let caller handle this problem"
return_statement
return "return"
null_literal "null"
; ";"
} "}"
catch_clause
catch "catch"
( "("
catch_formal_parameter
catch_type
type_identifier "Exception"
identifier "e"
) ")"
block
{ "{"
throw_statement
throw "throw"
method_invocation
identifier "invalidTypeIdException"
argument_list
( "("
identifier "baseType"
, ","
identifier "subClass"
, ","
method_invocation
identifier "String"
. "."
identifier "format"
argument_list
( "("
string_literal
" "\""
string_fragment "problem: (%s) %s"
" "\""
, ","
method_invocation
method_invocation
identifier "e"
. "."
identifier "getClass"
argument_list
( "("
) ")"
. "."
identifier "getName"
argument_list
( "("
) ")"
, ","
method_invocation
identifier "e"
. "."
identifier "getMessage"
argument_list
( "("
) ")"
) ")"
) ")"
; ";"
} "}"
if_statement (+33 nodes collapsed)
} "}"
throw_statement
throw "throw"
method_invocation
identifier "invalidTypeIdException"
argument_list
( "("
identifier "baseType"
, ","
identifier "subClass"
, ","
string_literal
" "\""
string_fragment "Not a subtype"
" "\""
) ")"
; ";"
} "}"
block_comment "/**\n * Helper method for constructing exception to indic"...
method_declaration (+21 nodes collapsed)
method_declaration
modifiers
public "public"
abstract "abstract"
type_identifier "TypeFactory"
identifier "getTypeFactory"
formal_parameters
( "("
) ")"
; ";"
block_comment "/*\n /****************************************************"...
method_declaration (+173 nodes collapsed)
method_declaration (+137 nodes collapsed)
block_comment "/**\n * Helper method to use to construct a {@link Conver"...
method_declaration (+377 nodes collapsed)
block_comment "/*\n /****************************************************"...
block_comment "/**\n * Helper method called to indicate a generic proble"...
method_declaration (+25 nodes collapsed)
block_comment "/**\n * @since 2.9\n */"
method_declaration (+48 nodes collapsed)
block_comment "/*\n /****************************************************"...
block_comment "/**\n * @since 2.9\n */"
method_declaration (+53 nodes collapsed)
block_comment "/**\n * @since 2.9\n */"
method_declaration (+93 nodes collapsed)
block_comment "/**\n * @since 2.9\n */"
method_declaration (+57 nodes collapsed)
block_comment "/**\n * @since 2.9\n */"
method_declaration (+47 nodes collapsed)
block_comment "/**\n * @since 2.9\n */"
method_declaration (+43 nodes collapsed)
} "}"

After

program
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "lang"
. "."
identifier "reflect"
. "."
identifier "Type"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Locale"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "TimeZone"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "annotation"
. "."
asterisk
* "*"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "cfg"
. "."
identifier "HandlerInstantiator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "cfg"
. "."
identifier "MapperConfig"
; ";"
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
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "introspect"
. "."
identifier "ObjectIdInfo"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "type"
. "."
identifier "TypeFactory"
; ";"
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 * Shared base class for {@link DeserializationContext} "...
class_declaration
modifiers
public "public"
abstract "abstract"
class "class"
identifier "DatabindContext"
class_body
{ "{"
block_comment "/**\n * Let's limit length of error messages, for cases w"...
field_declaration
modifiers
private "private"
final "final"
static "static"
integral_type
int "int"
variable_declarator
identifier "MAX_ERROR_STR_LEN"
= "="
decimal_integer_literal "500"
; ";"
block_comment "/*\n /****************************************************"...
block_comment "/**\n * Accessor to currently active configuration (both "...
method_declaration
modifiers
public "public"
abstract "abstract"
generic_type
type_identifier "MapperConfig"
type_arguments
< "<"
wildcard
? "?"
> ">"
identifier "getConfig"
formal_parameters
( "("
) ")"
; ";"
block_comment "/**\n * Convenience method for accessing serialization vi"...
method_declaration
modifiers
public "public"
abstract "abstract"
type_identifier "AnnotationIntrospector"
identifier "getAnnotationIntrospector"
formal_parameters
( "("
) ")"
; ";"
block_comment "/*\n /****************************************************"...
block_comment "/**\n * Convenience method for checking whether specified"...
method_declaration
modifiers
public "public"
abstract "abstract"
boolean_type "boolean"
identifier "isEnabled"
formal_parameters
( "("
formal_parameter
type_identifier "MapperFeature"
identifier "feature"
) ")"
; ";"
block_comment "/**\n * Convenience method for accessing serialization vi"...
method_declaration
modifiers
public "public"
abstract "abstract"
boolean_type "boolean"
identifier "canOverrideAccessModifiers"
formal_parameters
( "("
) ")"
; ";"
block_comment "/**\n * Accessor for locating currently active view, if a"...
method_declaration
modifiers
public "public"
abstract "abstract"
generic_type
type_identifier "Class"
type_arguments
< "<"
wildcard
? "?"
> ">"
identifier "getActiveView"
formal_parameters
( "("
) ")"
; ";"
block_comment "/**\n * @since 2.6\n */"
method_declaration
modifiers
public "public"
abstract "abstract"
type_identifier "Locale"
identifier "getLocale"
formal_parameters
( "("
) ")"
; ";"
block_comment "/**\n * @since 2.6\n */"
method_declaration
modifiers
public "public"
abstract "abstract"
type_identifier "TimeZone"
identifier "getTimeZone"
formal_parameters
( "("
) ")"
; ";"
block_comment "/**\n * @since 2.7\n */"
method_declaration (+22 nodes collapsed)
block_comment "/*\n /****************************************************"...
block_comment "/**\n * Method for accessing attributes available in this"...
method_declaration
modifiers
public "public"
abstract "abstract"
type_identifier "Object"
identifier "getAttribute"
formal_parameters
( "("
formal_parameter
type_identifier "Object"
identifier "key"
) ")"
; ";"
block_comment "/**\n * Method for setting per-call value of given attrib"...
method_declaration
modifiers
public "public"
abstract "abstract"
type_identifier "DatabindContext"
identifier "setAttribute"
formal_parameters
( "("
formal_parameter
type_identifier "Object"
identifier "key"
, ","
formal_parameter
type_identifier "Object"
identifier "value"
) ")"
; ";"
block_comment "/*\n /****************************************************"...
block_comment "/**\n * Convenience method for constructing {@link JavaTy"...
method_declaration (+45 nodes collapsed)
block_comment "/**\n * Convenience method for constructing subtypes, ret"...
method_declaration (+64 nodes collapsed)
block_comment "/**\n * Lookup method called when code needs to resolve c"...
method_declaration
modifiers
public "public"
type_identifier "JavaType"
identifier "resolveSubType"
formal_parameters
( "("
formal_parameter
type_identifier "JavaType"
identifier "baseType"
, ","
formal_parameter
type_identifier "String"
identifier "subClass"
) ")"
throws
throws "throws"
type_identifier "JsonMappingException"
block
{ "{"
line_comment "// 30-Jan-2010, tatu: Most ids are basic class names; so let"...
line_comment "// check if any generics info is added; and only then ask"...
line_comment "// to do translation when necessary"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
method_invocation
identifier "subClass"
. "."
identifier "indexOf"
argument_list
( "("
character_literal "'<'"
) ")"
> ">"
decimal_integer_literal "0"
) ")"
block (+51 nodes collapsed)
else "else"
block
{ "{"
local_variable_declaration
generic_type
type_identifier "Class"
type_arguments
< "<"
wildcard
? "?"
> ">"
variable_declarator
identifier "cls"
; ";"
try_statement
try "try"
block
{ "{"
expression_statement
assignment_expression
identifier "cls"
= "="
method_invocation
method_invocation
identifier "getTypeFactory"
argument_list
( "("
) ")"
. "."
identifier "findClass"
argument_list
( "("
identifier "subClass"
) ")"
; ";"
} "}"
catch_clause
catch "catch"
( "("
catch_formal_parameter
catch_type
type_identifier "ClassNotFoundException"
identifier "e"
) ")"
block
{ "{"
line_comment "// let caller handle this problem"
return_statement
return "return"
null_literal "null"
; ";"
} "}"
catch_clause
catch "catch"
( "("
catch_formal_parameter
catch_type
type_identifier "Exception"
identifier "e"
) ")"
block
{ "{"
throw_statement
throw "throw"
method_invocation
identifier "invalidTypeIdException"
argument_list
( "("
identifier "baseType"
, ","
identifier "subClass"
, ","
method_invocation
identifier "String"
. "."
identifier "format"
argument_list
( "("
string_literal
" "\""
string_fragment "problem: (%s) %s"
" "\""
, ","
method_invocation
method_invocation
identifier "e"
. "."
identifier "getClass"
argument_list
( "("
) ")"
. "."
identifier "getName"
argument_list
( "("
) ")"
, ","
method_invocation
identifier "ClassUtil"
. "."
identifier "exceptionMessage"
argument_list
( "("
identifier "e"
) ")"
) ")"
) ")"
; ";"
} "}"
if_statement (+33 nodes collapsed)
} "}"
throw_statement
throw "throw"
method_invocation
identifier "invalidTypeIdException"
argument_list
( "("
identifier "baseType"
, ","
identifier "subClass"
, ","
string_literal
" "\""
string_fragment "Not a subtype"
" "\""
) ")"
; ";"
} "}"
block_comment "/**\n * Helper method for constructing exception to indic"...
method_declaration (+21 nodes collapsed)
method_declaration
modifiers
public "public"
abstract "abstract"
type_identifier "TypeFactory"
identifier "getTypeFactory"
formal_parameters
( "("
) ")"
; ";"
block_comment "/*\n /****************************************************"...
method_declaration (+173 nodes collapsed)
method_declaration (+137 nodes collapsed)
block_comment "/**\n * Helper method to use to construct a {@link Conver"...
method_declaration (+377 nodes collapsed)
block_comment "/*\n /****************************************************"...
block_comment "/**\n * Helper method called to indicate a generic proble"...
method_declaration (+25 nodes collapsed)
block_comment "/**\n * @since 2.9\n */"
method_declaration (+48 nodes collapsed)
block_comment "/*\n /****************************************************"...
block_comment "/**\n * @since 2.9\n */"
method_declaration (+53 nodes collapsed)
block_comment "/**\n * @since 2.9\n */"
method_declaration (+93 nodes collapsed)
block_comment "/**\n * @since 2.9\n */"
method_declaration (+57 nodes collapsed)
block_comment "/**\n * @since 2.9\n */"
method_declaration (+47 nodes collapsed)
block_comment "/**\n * @since 2.9\n */"
method_declaration (+43 nodes collapsed)
} "}"