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–27 unchanged (27 lines)
28 */
29public class ChecksumCalculatingInputStream extends InputStream {
30 private final InputStream in;
31 private final Checksum checksum;
32
33 public ChecksumCalculatingInputStream(final Checksum checksum, final InputStream in) {
34
35
36
37 this.checksum = checksum;
38 this.in = in;
39 }
40
…lines 41–100 unchanged (60 lines)

After

…lines 1–28 unchanged (28 lines)
29public class ChecksumCalculatingInputStream extends InputStream {
30 private final InputStream in;
31 private final Checksum checksum;
32
33 public ChecksumCalculatingInputStream(final Checksum checksum, final InputStream in) {
34
35 if ( checksum == null ){
36 throw new NullPointerException("Parameter checksum must not be null");
37 }
38
39 if ( in == null ){
40 throw new NullPointerException("Parameter in must not be null");
41 }
42
43 this.checksum = checksum;
44 this.in = in;
45 }
46
47 /**
…lines 48–106 unchanged (59 lines)

Before

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) unde"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "compress"
. "."
identifier "utils"
; ";"
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 "io"
. "."
identifier "InputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "zip"
. "."
identifier "Checksum"
; ";"
block_comment "/**\n * A stream that calculates the checksum of the data rea"...
class_declaration
modifiers
public "public"
class "class"
identifier "ChecksumCalculatingInputStream"
superclass
extends "extends"
type_identifier "InputStream"
class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
type_identifier "InputStream"
variable_declarator
identifier "in"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "Checksum"
variable_declarator
identifier "checksum"
; ";"
constructor_declaration
modifiers
public "public"
identifier "ChecksumCalculatingInputStream"
formal_parameters
( "("
formal_parameter
modifiers
final "final"
type_identifier "Checksum"
identifier "checksum"
, ","
formal_parameter
modifiers
final "final"
type_identifier "InputStream"
identifier "in"
) ")"
constructor_body
{ "{"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "checksum"
= "="
identifier "checksum"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "in"
= "="
identifier "in"
; ";"
} "}"
block_comment "/**\n * Reads a single byte from the stream\n * @throw"...
method_declaration (+60 nodes collapsed)
block_comment "/**\n * Reads a byte array from the stream\n * @throws"...
method_declaration (+44 nodes collapsed)
block_comment "/**\n * Reads from the stream into a byte array.\n * @"...
method_declaration (+93 nodes collapsed)
method_declaration (+49 nodes collapsed)
block_comment "/**\n * Returns the calculated checksum.\n * @return t"...
method_declaration (+22 nodes collapsed)
} "}"

After

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) unde"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "compress"
. "."
identifier "utils"
; ";"
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 "io"
. "."
identifier "InputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "zip"
. "."
identifier "Checksum"
; ";"
block_comment "/**\n * A stream that calculates the checksum of the data rea"...
class_declaration
modifiers
public "public"
class "class"
identifier "ChecksumCalculatingInputStream"
superclass
extends "extends"
type_identifier "InputStream"
class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
type_identifier "InputStream"
variable_declarator
identifier "in"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "Checksum"
variable_declarator
identifier "checksum"
; ";"
constructor_declaration
modifiers
public "public"
identifier "ChecksumCalculatingInputStream"
formal_parameters
( "("
formal_parameter
modifiers
final "final"
type_identifier "Checksum"
identifier "checksum"
, ","
formal_parameter
modifiers
final "final"
type_identifier "InputStream"
identifier "in"
) ")"
constructor_body
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "checksum"
== "=="
null_literal "null"
) ")"
block
{ "{"
throw_statement
throw "throw"
object_creation_expression
new "new"
type_identifier "NullPointerException"
argument_list
( "("
string_literal
" "\""
string_fragment "Parameter checksum must not be null"
" "\""
) ")"
; ";"
} "}"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "in"
== "=="
null_literal "null"
) ")"
block
{ "{"
throw_statement
throw "throw"
object_creation_expression
new "new"
type_identifier "NullPointerException"
argument_list
( "("
string_literal
" "\""
string_fragment "Parameter in must not be null"
" "\""
) ")"
; ";"
} "}"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "checksum"
= "="
identifier "checksum"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "in"
= "="
identifier "in"
; ";"
} "}"
block_comment "/**\n * Reads a single byte from the stream\n * @throw"...
method_declaration (+60 nodes collapsed)
block_comment "/**\n * Reads a byte array from the stream\n * @throws"...
method_declaration (+44 nodes collapsed)
block_comment "/**\n * Reads from the stream into a byte array.\n * @"...
method_declaration (+93 nodes collapsed)
method_declaration (+49 nodes collapsed)
block_comment "/**\n * Returns the calculated checksum.\n * @return t"...
method_declaration (+22 nodes collapsed)
} "}"