SpineEventEngine / validation

Apache License 2.0
2 stars 0 forks source link

Do not re-validate messages with `validate()` already called with no errors #50

Open alexander-yevsyukov opened 1 year ago

alexander-yevsyukov commented 1 year ago

... since Messages are immutable.

We use runtime validate in some framework places. For example, CommandFactory validates incoming command messages when producing commands.

This: 1) It causes some side effects like warnings on command ID fields of primitive integer types. 2) Is unnecessary if the message was already validated.