This mapping has 1 multi-map group: several pairings are equally correct there. The code view shows one arbitrary valid pairing, not the only one.

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

1package com.fasterxml.jackson.databind.ser.std;
2
3import java.io.IOException;
4import java.util.Calendar;
5import java.util.Date;
6
7import com.fasterxml.jackson.core.*;
8import com.fasterxml.jackson.databind.*;
9import com.fasterxml.jackson.databind.ser.impl.PropertySerializerMap;
10
11@SuppressWarnings("serial")
12public class StdKeySerializers
13{
14 protected final static JsonSerializer<Object> DEFAULT_KEY_SERIALIZER = new StdKeySerializer();
15
16 protected final static JsonSerializer<Object> DEFAULT_STRING_SERIALIZER = new StringKeySerializer();
…lines 17–75 unchanged (59 lines)
76 // 11-Aug-2016, tatu: Turns out we get this if `EnumMap` is the root value because
77 // then there is no static type
78 if (rawKeyType == Enum.class) {
79 return new Dynamic();
80 }
81 if (rawKeyType.isEnum()) {
82 return new Default(Default.TYPE_ENUM, rawKeyType);
83 }
84 }
85 return DEFAULT_KEY_SERIALIZER;
86 }
87
88 /**
…lines 89–208 unchanged (120 lines)
209
210 /**
211 * Specialized instance to use for Enum keys, as per [databind#1322]
212 *
213 * @since 2.8
214 */
215
216
217
218}
219

After

1package com.fasterxml.jackson.databind.ser.std;
2
3import java.io.IOException;
4import java.util.Calendar;
5import java.util.Date;
6
7import com.fasterxml.jackson.core.*;
8import com.fasterxml.jackson.databind.*;
9import com.fasterxml.jackson.databind.ser.impl.PropertySerializerMap;
10import com.fasterxml.jackson.databind.util.EnumValues;
11
12@SuppressWarnings("serial")
13public class StdKeySerializers
14{
15 protected final static JsonSerializer<Object> DEFAULT_KEY_SERIALIZER = new StdKeySerializer();
16
…lines 17–76 unchanged (60 lines)
77 // 11-Aug-2016, tatu: Turns out we get this if `EnumMap` is the root value because
78 // then there is no static type
79 if (rawKeyType == Enum.class) {
80 return new Dynamic();
81 }
82 if (rawKeyType.isEnum()) {
83 return EnumKeySerializer.construct(rawKeyType,
84 EnumValues.constructFromName(config, (Class<Enum<?>>) rawKeyType));
85 }
86 }
87 return DEFAULT_KEY_SERIALIZER;
88 }
89
90 /**
…lines 91–210 unchanged (120 lines)
211
212 /**
213 * Specialized instance to use for Enum keys, as per [databind#1322]
214 *
215 * @since 2.8
216 */
217 public static class EnumKeySerializer extends StdSerializer<Object>
218 {
219 protected final EnumValues _values;
220
221 protected EnumKeySerializer(Class<?> enumType, EnumValues values) {
222 super(enumType, false);
223 _values = values;
224 }
225
226 public static EnumKeySerializer construct(Class<?> enumType,
227 EnumValues enumValues)
228 {
229 return new EnumKeySerializer(enumType, enumValues);
230 }
231
232 @Override
233 public void serialize(Object value, JsonGenerator g, SerializerProvider serializers)
234 throws IOException
235 {
236 if (serializers.isEnabled(SerializationFeature.WRITE_ENUMS_USING_TO_STRING)) {
237 g.writeFieldName(value.toString());
238 return;
239 }
240 Enum<?> en = (Enum<?>) value;
241 g.writeFieldName(_values.serializedValueFor(en));
242 }
243 }
244}
245

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 "ser"
. "."
identifier "std"
; ";"
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 "Calendar"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Date"
; ";"
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
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
asterisk
* "*"
; ";"
import_declaration (+22 nodes collapsed)
class_declaration
modifiers
annotation
@ "@"
identifier "SuppressWarnings"
annotation_argument_list
( "("
string_literal
" "\""
string_fragment "serial"
" "\""
) ")"
public "public"
class "class"
identifier "StdKeySerializers"
class_body
{ "{"
field_declaration (+21 nodes collapsed)
field_declaration (+21 nodes collapsed)
constructor_declaration
modifiers
private "private"
identifier "StdKeySerializers"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
} "}"
block_comment "/**\n * @param config Serialization configuration in use,"...
method_declaration (+270 nodes collapsed)
block_comment "/**\n * Method called if no specified key serializer was "...
method_declaration
modifiers
annotation
@ "@"
identifier "SuppressWarnings"
annotation_argument_list
( "("
string_literal
" "\""
string_fragment "unchecked"
" "\""
) ")"
public "public"
static "static"
generic_type
type_identifier "JsonSerializer"
type_arguments
< "<"
type_identifier "Object"
> ">"
identifier "getFallbackKeySerializer"
formal_parameters
( "("
formal_parameter
type_identifier "SerializationConfig"
identifier "config"
, ","
formal_parameter
generic_type
type_identifier "Class"
type_arguments
< "<"
wildcard
? "?"
> ">"
identifier "rawKeyType"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "rawKeyType"
!= "!="
null_literal "null"
) ")"
block
{ "{"
line_comment "// 29-Sep-2015, tatu: Odd case here, of `Enum`, which we may"...
line_comment "// if that is a bug or feature. Regardless, it seems to re"...
line_comment "// (compared to getting actual fully typed Enum)."
line_comment "// Note that this might even work from the earlier point, b"...
line_comment "// 11-Aug-2016, tatu: Turns out we get this if `EnumMap` is "...
line_comment "// then there is no static type"
if_statement (+24 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
identifier "rawKeyType"
. "."
identifier "isEnum"
argument_list
( "("
) ")"
) ")"
block
{ "{"
return_statement
return "return"
object_creation_expression
new "new"
type_identifier "Default"
argument_list
( "("
field_access
identifier "Default"
. "."
identifier "TYPE_ENUM"
, ","
identifier "rawKeyType" any 1:2
) ")"
; ";"
} "}"
} "}"
return_statement
return "return"
identifier "DEFAULT_KEY_SERIALIZER"
; ";"
} "}"
block_comment "/**\n * @deprecated since 2.7\n */"
method_declaration (+24 nodes collapsed)
block_comment "/*\n /****************************************************"...
block_comment "/**\n * This is a \"chameleon\" style multi-type key serial"...
class_declaration (+344 nodes collapsed)
block_comment "/**\n * Key serializer used when key type is not known st"...
class_declaration (+290 nodes collapsed)
block_comment "/**\n * Simple and fast key serializer when keys are Stri"...
class_declaration (+81 nodes collapsed)
block_comment "/**\n * Specialized instance to use for Enum keys, as per"...
} "}"

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 "ser"
. "."
identifier "std"
; ";"
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 "Calendar"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Date"
; ";"
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
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 "util"
. "."
identifier "EnumValues"
; ";"
class_declaration
modifiers
annotation
@ "@"
identifier "SuppressWarnings"
annotation_argument_list
( "("
string_literal
" "\""
string_fragment "serial"
" "\""
) ")"
public "public"
class "class"
identifier "StdKeySerializers"
class_body
{ "{"
field_declaration (+21 nodes collapsed)
field_declaration (+21 nodes collapsed)
constructor_declaration
modifiers
private "private"
identifier "StdKeySerializers"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
} "}"
block_comment "/**\n * @param config Serialization configuration in use,"...
method_declaration (+270 nodes collapsed)
block_comment "/**\n * Method called if no specified key serializer was "...
method_declaration
modifiers
annotation
@ "@"
identifier "SuppressWarnings"
annotation_argument_list
( "("
string_literal
" "\""
string_fragment "unchecked"
" "\""
) ")"
public "public"
static "static"
generic_type
type_identifier "JsonSerializer"
type_arguments
< "<"
type_identifier "Object"
> ">"
identifier "getFallbackKeySerializer"
formal_parameters
( "("
formal_parameter
type_identifier "SerializationConfig"
identifier "config"
, ","
formal_parameter
generic_type
type_identifier "Class"
type_arguments
< "<"
wildcard
? "?"
> ">"
identifier "rawKeyType"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "rawKeyType"
!= "!="
null_literal "null"
) ")"
block
{ "{"
line_comment "// 29-Sep-2015, tatu: Odd case here, of `Enum`, which we may"...
line_comment "// if that is a bug or feature. Regardless, it seems to re"...
line_comment "// (compared to getting actual fully typed Enum)."
line_comment "// Note that this might even work from the earlier point, b"...
line_comment "// 11-Aug-2016, tatu: Turns out we get this if `EnumMap` is "...
line_comment "// then there is no static type"
if_statement (+24 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
identifier "rawKeyType"
. "."
identifier "isEnum"
argument_list
( "("
) ")"
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "EnumKeySerializer"
. "."
identifier "construct"
argument_list
( "("
identifier "rawKeyType" any 1:2
, ","
method_invocation
identifier "EnumValues"
. "."
identifier "constructFromName"
argument_list
( "("
identifier "config"
, ","
cast_expression
( "("
generic_type
type_identifier "Class"
type_arguments
< "<"
generic_type
type_identifier "Enum"
type_arguments
< "<"
wildcard
? "?"
> ">"
> ">"
) ")"
identifier "rawKeyType" any 1:2
) ")"
) ")"
; ";"
} "}"
} "}"
return_statement
return "return"
identifier "DEFAULT_KEY_SERIALIZER"
; ";"
} "}"
block_comment "/**\n * @deprecated since 2.7\n */"
method_declaration (+24 nodes collapsed)
block_comment "/*\n /****************************************************"...
block_comment "/**\n * This is a \"chameleon\" style multi-type key serial"...
class_declaration (+344 nodes collapsed)
block_comment "/**\n * Key serializer used when key type is not known st"...
class_declaration (+290 nodes collapsed)
block_comment "/**\n * Simple and fast key serializer when keys are Stri"...
class_declaration (+81 nodes collapsed)
block_comment "/**\n * Specialized instance to use for Enum keys, as per"...
class_declaration
modifiers
public "public"
static "static"
class "class"
identifier "EnumKeySerializer"
superclass
extends "extends"
generic_type
type_identifier "StdSerializer"
type_arguments
< "<"
type_identifier "Object"
> ">"
class_body
{ "{"
field_declaration
modifiers
protected "protected"
final "final"
type_identifier "EnumValues"
variable_declarator
identifier "_values"
; ";"
constructor_declaration
modifiers
protected "protected"
identifier "EnumKeySerializer"
formal_parameters
( "("
formal_parameter
generic_type
type_identifier "Class"
type_arguments
< "<"
wildcard
? "?"
> ">"
identifier "enumType"
, ","
formal_parameter
type_identifier "EnumValues"
identifier "values"
) ")"
constructor_body
{ "{"
explicit_constructor_invocation
super "super"
argument_list
( "("
identifier "enumType"
, ","
false "false"
) ")"
; ";"
expression_statement
assignment_expression
identifier "_values"
= "="
identifier "values"
; ";"
} "}"
method_declaration
modifiers
public "public"
static "static"
type_identifier "EnumKeySerializer"
identifier "construct"
formal_parameters
( "("
formal_parameter
generic_type
type_identifier "Class"
type_arguments
< "<"
wildcard
? "?"
> ">"
identifier "enumType"
, ","
formal_parameter
type_identifier "EnumValues"
identifier "enumValues"
) ")"
block
{ "{"
return_statement
return "return"
object_creation_expression
new "new"
type_identifier "EnumKeySerializer"
argument_list
( "("
identifier "enumType"
, ","
identifier "enumValues"
) ")"
; ";"
} "}"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
void_type "void"
identifier "serialize"
formal_parameters
( "("
formal_parameter
type_identifier "Object"
identifier "value"
, ","
formal_parameter
type_identifier "JsonGenerator"
identifier "g"
, ","
formal_parameter
type_identifier "SerializerProvider"
identifier "serializers"
) ")"
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
identifier "serializers"
. "."
identifier "isEnabled"
argument_list
( "("
field_access
identifier "SerializationFeature"
. "."
identifier "WRITE_ENUMS_USING_TO_STRING"
) ")"
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "g"
. "."
identifier "writeFieldName"
argument_list
( "("
method_invocation
identifier "value"
. "."
identifier "toString"
argument_list
( "("
) ")"
) ")"
; ";"
return_statement
return "return"
; ";"
} "}"
local_variable_declaration
generic_type
type_identifier "Enum"
type_arguments
< "<"
wildcard
? "?"
> ">"
variable_declarator
identifier "en"
= "="
cast_expression
( "("
generic_type
type_identifier "Enum"
type_arguments
< "<"
wildcard
? "?"
> ">"
) ")"
identifier "value"
; ";"
expression_statement
method_invocation
identifier "g"
. "."
identifier "writeFieldName"
argument_list
( "("
method_invocation
identifier "_values"
. "."
identifier "serializedValueFor"
argument_list
( "("
identifier "en"
) ")"
) ")"
; ";"
} "}"
} "}"
} "}"