expectedNotDefault

public static ValueMismatch expectedNotDefault(Message expected, int version)

Creates a ValueMismatch for a command that wanted to clear a value, but discovered that the field already has the default value.

Return

new ValueMismatch instance

Parameters

expected

the value of the field that the command wanted to clear

version

the version of the entity in which the mismatch is discovered


public static ValueMismatch expectedNotDefault(Message expected, Message newValue, int version)

Creates a ValueMismatch for a command that wanted to change a field value, but discovered that the field has the default value.

Return

new ValueMismatch instance

Parameters

expected

the value expected by the command

newValue

the value the command wanted to set

version

the version of the entity in which the mismatch is discovered