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–112 unchanged (112 lines)
113 }
114 Exception cause = null;
115 try {
116 // 19-May-2017, tatu: Used to require non-null result (assuming `null`
117 // indicated error; but that seems wrong. Should be able to return
118 // `null` as value.
119 if (_deserialize(text, ctxt) != null) {
120 return _deserialize(text, ctxt);
121 }
122 } catch (IllegalArgumentException iae) {
123 cause = iae;
124 } catch (MalformedURLException me) {
125 cause = me;
126 }
127 String msg = "not a valid textual representation";
…lines 128–315 unchanged (188 lines)

After

…lines 1–112 unchanged (112 lines)
113 }
114 Exception cause = null;
115 try {
116 // 19-May-2017, tatu: Used to require non-null result (assuming `null`
117 // indicated error; but that seems wrong. Should be able to return
118 // `null` as value.
119 return _deserialize(text, ctxt);
120 } catch (IllegalArgumentException iae) {
121 cause = iae;
122 } catch (MalformedURLException me) {
123 cause = me;
124 }
125 String msg = "not a valid textual representation";
126 if (cause != null) {
…lines 127–313 unchanged (187 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 "deser"
. "."
identifier "std"
; ";"
import_declaration
import "import"
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
asterisk
* "*"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "net"
. "."
identifier "InetAddress"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "net"
. "."
identifier "InetSocketAddress"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "net"
. "."
identifier "MalformedURLException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "net"
. "."
identifier "URI"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "net"
. "."
identifier "URL"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "nio"
. "."
identifier "charset"
. "."
identifier "Charset"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Currency"
; ";"
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 "java"
. "."
identifier "util"
. "."
identifier "regex"
. "."
identifier "Pattern"
; ";"
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
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "core"
. "."
identifier "util"
. "."
identifier "VersionUtil"
; ";"
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 "JavaType"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "JsonMappingException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "exc"
. "."
identifier "InvalidFormatException"
; ";"
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 simple deserializers that only accept "...
class_declaration
modifiers
annotation
@ "@"
identifier "SuppressWarnings"
annotation_argument_list
( "("
string_literal
" "\""
string_fragment "serial"
" "\""
) ")"
public "public"
abstract "abstract"
class "class"
identifier "FromStringDeserializer"
type_parameters
< "<"
type_parameter
type_identifier "T"
> ">"
superclass
extends "extends"
generic_type
type_identifier "StdScalarDeserializer"
type_arguments
< "<"
type_identifier "T"
> ">"
class_body
{ "{"
method_declaration (+105 nodes collapsed)
block_comment "/*\n /****************************************************"...
constructor_declaration (+26 nodes collapsed)
block_comment "/**\n * Factory method for trying to find a deserializer "...
method_declaration (+373 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration
modifiers
annotation
@ "@"
identifier "SuppressWarnings"
annotation_argument_list
( "("
string_literal
" "\""
string_fragment "unchecked"
" "\""
) ")"
marker_annotation
@ "@"
identifier "Override"
public "public"
type_identifier "T"
identifier "deserialize"
formal_parameters
( "("
formal_parameter
type_identifier "JsonParser"
identifier "p"
, ","
formal_parameter
type_identifier "DeserializationContext"
identifier "ctxt"
) ")"
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
line_comment "// 22-Sep-2012, tatu: For 2.1, use this new method, may forc"...
local_variable_declaration
type_identifier "String"
variable_declarator
identifier "text"
= "="
method_invocation
identifier "p"
. "."
identifier "getValueAsString"
argument_list
( "("
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "text"
!= "!="
null_literal "null"
) ")"
block
{ "{"
line_comment "// has String representation"
if_statement (+51 nodes collapsed)
local_variable_declaration
type_identifier "Exception"
variable_declarator
identifier "cause"
= "="
null_literal "null"
; ";"
try_statement
try "try"
block
{ "{"
line_comment "// 19-May-2017, tatu: Used to require non-null result (assum"...
line_comment "// indicated error; but that seems wrong. Should be able "...
line_comment "// `null` as value."
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
method_invocation
identifier "_deserialize"
argument_list
( "("
identifier "text"
, ","
identifier "ctxt"
) ")"
!= "!="
null_literal "null"
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "_deserialize"
argument_list
( "("
identifier "text"
, ","
identifier "ctxt"
) ")"
; ";"
} "}"
} "}"
catch_clause
catch "catch"
( "("
catch_formal_parameter
catch_type
type_identifier "IllegalArgumentException"
identifier "iae"
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "cause"
= "="
identifier "iae"
; ";"
} "}"
catch_clause
catch "catch"
( "("
catch_formal_parameter
catch_type
type_identifier "MalformedURLException"
identifier "me"
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "cause"
= "="
identifier "me"
; ";"
} "}"
local_variable_declaration
type_identifier "String"
variable_declarator
identifier "msg"
= "="
string_literal
" "\""
string_fragment "not a valid textual representation"
" "\""
; ";"
if_statement (+52 nodes collapsed)
line_comment "// 05-May-2016, tatu: Unlike most usage, this seems legit, s"...
local_variable_declaration
type_identifier "JsonMappingException"
variable_declarator
identifier "e"
= "="
method_invocation
identifier "ctxt"
. "."
identifier "weirdStringException"
argument_list
( "("
identifier "text"
, ","
identifier "_valueClass"
, ","
identifier "msg"
) ")"
; ";"
if_statement (+22 nodes collapsed)
throw_statement
throw "throw"
identifier "e"
; ";"
line_comment "// nothing to do here, yet? We'll fail anyway"
} "}"
local_variable_declaration
type_identifier "JsonToken"
variable_declarator
identifier "t"
= "="
method_invocation
identifier "p"
. "."
identifier "getCurrentToken"
argument_list
( "("
) ")"
; ";"
line_comment "// [databind#381]"
if_statement (+26 nodes collapsed)
if_statement (+86 nodes collapsed)
return_statement
return "return"
cast_expression
( "("
type_identifier "T"
) ")"
method_invocation
identifier "ctxt"
. "."
identifier "handleUnexpectedToken"
argument_list
( "("
identifier "_valueClass"
, ","
identifier "p"
) ")"
; ";"
} "}"
method_declaration
modifiers
protected "protected"
abstract "abstract"
type_identifier "T"
identifier "_deserialize"
formal_parameters
( "("
formal_parameter
type_identifier "String"
identifier "value"
, ","
formal_parameter
type_identifier "DeserializationContext"
identifier "ctxt"
) ")"
throws
throws "throws"
type_identifier "IOException"
; ";"
method_declaration (+61 nodes collapsed)
method_declaration
modifiers
protected "protected"
type_identifier "T"
identifier "_deserializeFromEmptyString"
formal_parameters
( "("
) ")"
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
return_statement
return "return"
null_literal "null"
; ";"
} "}"
block_comment "/*\n /****************************************************"...
block_comment "/**\n * \"Chameleon\" deserializer that works on simple typ"...
class_declaration (+1097 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 "deser"
. "."
identifier "std"
; ";"
import_declaration
import "import"
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
asterisk
* "*"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "net"
. "."
identifier "InetAddress"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "net"
. "."
identifier "InetSocketAddress"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "net"
. "."
identifier "MalformedURLException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "net"
. "."
identifier "URI"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "net"
. "."
identifier "URL"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "nio"
. "."
identifier "charset"
. "."
identifier "Charset"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Currency"
; ";"
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 "java"
. "."
identifier "util"
. "."
identifier "regex"
. "."
identifier "Pattern"
; ";"
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
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "core"
. "."
identifier "util"
. "."
identifier "VersionUtil"
; ";"
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 "JavaType"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "JsonMappingException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "exc"
. "."
identifier "InvalidFormatException"
; ";"
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 simple deserializers that only accept "...
class_declaration
modifiers
annotation
@ "@"
identifier "SuppressWarnings"
annotation_argument_list
( "("
string_literal
" "\""
string_fragment "serial"
" "\""
) ")"
public "public"
abstract "abstract"
class "class"
identifier "FromStringDeserializer"
type_parameters
< "<"
type_parameter
type_identifier "T"
> ">"
superclass
extends "extends"
generic_type
type_identifier "StdScalarDeserializer"
type_arguments
< "<"
type_identifier "T"
> ">"
class_body
{ "{"
method_declaration (+105 nodes collapsed)
block_comment "/*\n /****************************************************"...
constructor_declaration (+26 nodes collapsed)
block_comment "/**\n * Factory method for trying to find a deserializer "...
method_declaration (+373 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration
modifiers
annotation
@ "@"
identifier "SuppressWarnings"
annotation_argument_list
( "("
string_literal
" "\""
string_fragment "unchecked"
" "\""
) ")"
marker_annotation
@ "@"
identifier "Override"
public "public"
type_identifier "T"
identifier "deserialize"
formal_parameters
( "("
formal_parameter
type_identifier "JsonParser"
identifier "p"
, ","
formal_parameter
type_identifier "DeserializationContext"
identifier "ctxt"
) ")"
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
line_comment "// 22-Sep-2012, tatu: For 2.1, use this new method, may forc"...
local_variable_declaration
type_identifier "String"
variable_declarator
identifier "text"
= "="
method_invocation
identifier "p"
. "."
identifier "getValueAsString"
argument_list
( "("
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "text"
!= "!="
null_literal "null"
) ")"
block
{ "{"
line_comment "// has String representation"
if_statement (+51 nodes collapsed)
local_variable_declaration
type_identifier "Exception"
variable_declarator
identifier "cause"
= "="
null_literal "null"
; ";"
try_statement
try "try"
block
{ "{"
line_comment "// 19-May-2017, tatu: Used to require non-null result (assum"...
line_comment "// indicated error; but that seems wrong. Should be able "...
line_comment "// `null` as value."
return_statement
return "return"
method_invocation
identifier "_deserialize"
argument_list
( "("
identifier "text"
, ","
identifier "ctxt"
) ")"
; ";"
} "}"
catch_clause
catch "catch"
( "("
catch_formal_parameter
catch_type
type_identifier "IllegalArgumentException"
identifier "iae"
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "cause"
= "="
identifier "iae"
; ";"
} "}"
catch_clause
catch "catch"
( "("
catch_formal_parameter
catch_type
type_identifier "MalformedURLException"
identifier "me"
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "cause"
= "="
identifier "me"
; ";"
} "}"
local_variable_declaration
type_identifier "String"
variable_declarator
identifier "msg"
= "="
string_literal
" "\""
string_fragment "not a valid textual representation"
" "\""
; ";"
if_statement (+52 nodes collapsed)
line_comment "// 05-May-2016, tatu: Unlike most usage, this seems legit, s"...
local_variable_declaration
type_identifier "JsonMappingException"
variable_declarator
identifier "e"
= "="
method_invocation
identifier "ctxt"
. "."
identifier "weirdStringException"
argument_list
( "("
identifier "text"
, ","
identifier "_valueClass"
, ","
identifier "msg"
) ")"
; ";"
if_statement (+22 nodes collapsed)
throw_statement
throw "throw"
identifier "e"
; ";"
line_comment "// nothing to do here, yet? We'll fail anyway"
} "}"
local_variable_declaration
type_identifier "JsonToken"
variable_declarator
identifier "t"
= "="
method_invocation
identifier "p"
. "."
identifier "getCurrentToken"
argument_list
( "("
) ")"
; ";"
line_comment "// [databind#381]"
if_statement (+26 nodes collapsed)
if_statement (+86 nodes collapsed)
return_statement
return "return"
cast_expression
( "("
type_identifier "T"
) ")"
method_invocation
identifier "ctxt"
. "."
identifier "handleUnexpectedToken"
argument_list
( "("
identifier "_valueClass"
, ","
identifier "p"
) ")"
; ";"
} "}"
method_declaration
modifiers
protected "protected"
abstract "abstract"
type_identifier "T"
identifier "_deserialize"
formal_parameters
( "("
formal_parameter
type_identifier "String"
identifier "value"
, ","
formal_parameter
type_identifier "DeserializationContext"
identifier "ctxt"
) ")"
throws
throws "throws"
type_identifier "IOException"
; ";"
method_declaration (+61 nodes collapsed)
method_declaration
modifiers
protected "protected"
type_identifier "T"
identifier "_deserializeFromEmptyString"
formal_parameters
( "("
) ")"
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
return_statement
return "return"
null_literal "null"
; ";"
} "}"
block_comment "/*\n /****************************************************"...
block_comment "/**\n * \"Chameleon\" deserializer that works on simple typ"...
class_declaration (+1097 nodes collapsed)
} "}"