Skip to content

invariant statement executed twice when false #152

Open

Description

@ThijsBroersen

Hi Flavio,

I found out that when an invariant statement outputs false it is immediately executed again before throwing the InvariantViolationException. Is this correct?

Kind regards,
Thijs

Activity

  1. fwbrasil commented on Jul 28, 2014

    @fwbrasil
    Owner

    This is the expected behavior, since the validation is done in more than one phase. Is it affecting your application's behavior?

  2. ThijsBroersen commented on Jul 28, 2014

    @ThijsBroersen
    Author

    Thanks for the reply!
    It is not affecting my application's behavior too much, but I noticed it in my debug-logging and I do not see the logic: each executing gives the same result so why is there more than one validation phase?

  3. fwbrasil commented on Jul 28, 2014

    @fwbrasil
    Owner

    Yeah, there is space for optimizations for the invariants. Lets keep this issue open to review the invariant validation phases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions