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–7 unchanged (7 lines)
8package com.google.protobuf;
9
10import static com.google.protobuf.Internal.checkNotNull;
11
12import java.io.IOException;
13import java.util.concurrent.ConcurrentHashMap;
14import java.util.concurrent.ConcurrentMap;
15
16@ExperimentalApi
17@CheckReturnValue
18final class Protobuf {
19 private static final Protobuf INSTANCE = new Protobuf();
20
21 private final SchemaFactory schemaFactory;
22
23 // TODO: b/341207042 - Consider using ClassValue instead.
24 private final ConcurrentMap<Class<?>, Schema<?>> schemaCache =
25 new ConcurrentHashMap<Class<?>, Schema<?>>();
26
27 /** Gets the singleton instance of the Protobuf runtime. */
28 static Protobuf getInstance() {
29 return INSTANCE;
30 }
31
…lines 32–76 unchanged (45 lines)

After

…lines 1–7 unchanged (7 lines)
8package com.google.protobuf;
9
10import static com.google.protobuf.Internal.checkNotNull;
11
12import java.io.IOException;
13import java.util.concurrent.ConcurrentHashMap;
14
15@ExperimentalApi
16@CheckReturnValue
17final class Protobuf {
18 private static final Protobuf INSTANCE = new Protobuf();
19
20 private final SchemaFactory schemaFactory;
21
22 // TODO: b/341207042 - Consider using ClassValue instead.
23 private final ConcurrentHashMap<Class<?>, Schema<?>> schemaCache =
24 new ConcurrentHashMap<Class<?>, Schema<?>>();
25
26 /** Gets the singleton instance of the Protobuf runtime. */
27 static Protobuf getInstance() {
28 return INSTANCE;
29 }
30
…lines 31–75 unchanged (45 lines)

Before

program
line_comment "// Protocol Buffers - Google's data interchange format"
line_comment "// Copyright 2008 Google Inc. All rights reserved."
line_comment "//"
line_comment "// Use of this source code is governed by a BSD-style"
line_comment "// license that can be found in the LICENSE file or at"
line_comment "// https://developers.google.com/open-source/licenses/bsd"
package_declaration
package "package"
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "protobuf"
; ";"
import_declaration
import "import"
static "static"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "protobuf"
. "."
identifier "Internal"
. "."
identifier "checkNotNull"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "IOException"
; ";"
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
identifier "java"
. "."
identifier "util"
. "."
identifier "concurrent"
. "."
identifier "ConcurrentMap"
; ";"
class_declaration
modifiers
marker_annotation
@ "@"
identifier "ExperimentalApi"
marker_annotation
@ "@"
identifier "CheckReturnValue"
final "final"
class "class"
identifier "Protobuf"
class_body
{ "{"
field_declaration
modifiers
private "private"
static "static"
final "final"
type_identifier "Protobuf"
variable_declarator
identifier "INSTANCE"
= "="
object_creation_expression
new "new"
type_identifier "Protobuf"
argument_list
( "("
) ")"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "SchemaFactory"
variable_declarator
identifier "schemaFactory"
; ";"
line_comment "// TODO: b/341207042 - Consider using ClassValue instead."
field_declaration
modifiers
private "private"
final "final"
generic_type
type_identifier "ConcurrentMap"
type_arguments
< "<"
generic_type
type_identifier "Class"
type_arguments
< "<"
wildcard
? "?"
> ">"
, ","
generic_type
type_identifier "Schema"
type_arguments
< "<"
wildcard
? "?"
> ">"
> ">"
variable_declarator (+28 nodes collapsed)
; ";"
block_comment "/** Gets the singleton instance of the Protobuf runtime. */"
method_declaration
modifiers
static "static"
type_identifier "Protobuf"
identifier "getInstance"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "INSTANCE"
; ";"
} "}"
block_comment "/** Writes the given message to the target {@link Writer}. *"...
method_declaration (+41 nodes collapsed)
block_comment "/** Reads fields from the given {@link Reader} and merges th"...
method_declaration (+47 nodes collapsed)
block_comment "/** Checks if all required fields are set. */"
method_declaration (+33 nodes collapsed)
block_comment "/** Gets the schema for the given message type. */"
method_declaration (+181 nodes collapsed)
block_comment "/** Gets the schema for the given message. */"
method_declaration (+57 nodes collapsed)
constructor_declaration (+21 nodes collapsed)
} "}"

After

program
line_comment "// Protocol Buffers - Google's data interchange format"
line_comment "// Copyright 2008 Google Inc. All rights reserved."
line_comment "//"
line_comment "// Use of this source code is governed by a BSD-style"
line_comment "// license that can be found in the LICENSE file or at"
line_comment "// https://developers.google.com/open-source/licenses/bsd"
package_declaration
package "package"
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "protobuf"
; ";"
import_declaration
import "import"
static "static"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "protobuf"
. "."
identifier "Internal"
. "."
identifier "checkNotNull"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "IOException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "concurrent"
. "."
identifier "ConcurrentHashMap"
; ";"
class_declaration
modifiers
marker_annotation
@ "@"
identifier "ExperimentalApi"
marker_annotation
@ "@"
identifier "CheckReturnValue"
final "final"
class "class"
identifier "Protobuf"
class_body
{ "{"
field_declaration
modifiers
private "private"
static "static"
final "final"
type_identifier "Protobuf"
variable_declarator
identifier "INSTANCE"
= "="
object_creation_expression
new "new"
type_identifier "Protobuf"
argument_list
( "("
) ")"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "SchemaFactory"
variable_declarator
identifier "schemaFactory"
; ";"
line_comment "// TODO: b/341207042 - Consider using ClassValue instead."
field_declaration
modifiers
private "private"
final "final"
generic_type
type_identifier "ConcurrentHashMap"
type_arguments
< "<"
generic_type
type_identifier "Class"
type_arguments
< "<"
wildcard
? "?"
> ">"
, ","
generic_type
type_identifier "Schema"
type_arguments
< "<"
wildcard
? "?"
> ">"
> ">"
variable_declarator (+28 nodes collapsed)
; ";"
block_comment "/** Gets the singleton instance of the Protobuf runtime. */"
method_declaration
modifiers
static "static"
type_identifier "Protobuf"
identifier "getInstance"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "INSTANCE"
; ";"
} "}"
block_comment "/** Writes the given message to the target {@link Writer}. *"...
method_declaration (+41 nodes collapsed)
block_comment "/** Reads fields from the given {@link Reader} and merges th"...
method_declaration (+47 nodes collapsed)
block_comment "/** Checks if all required fields are set. */"
method_declaration (+33 nodes collapsed)
block_comment "/** Gets the schema for the given message type. */"
method_declaration (+181 nodes collapsed)
block_comment "/** Gets the schema for the given message. */"
method_declaration (+57 nodes collapsed)
constructor_declaration (+21 nodes collapsed)
} "}"