Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extra model integrity checks #327

Merged
merged 3 commits into from May 24, 2020
Merged

Add extra model integrity checks #327

merged 3 commits into from May 24, 2020

Conversation

amolenaar
Copy link
Member

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Documentation content changes

What is the current behavior?

It used to be possible for diagram items to end up in the model. This leads to issues when loading models.

Issue Number: #286, #326

What is the new behavior?

Extra checks are done for the type sanity for both Element Factory (which contains the model) and Diagram (where diagram items are added).

This should ensure the model stays clean.

ElementFatctory.bind() has been removed since it was not used (nor tested).

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

These should not end up in the model.
Also `bind()` has been removed: it opens a backdoor for invalid data.
@amolenaar amolenaar requested a review from danyeaw May 24, 2020 09:56
@amolenaar amolenaar added the bug An issue in the application label May 24, 2020
@amolenaar amolenaar added this to the 1.3 milestone May 24, 2020
@amolenaar amolenaar changed the title Model integrity Add extra model integrity checks May 24, 2020
@danyeaw danyeaw merged commit 3c2b581 into master May 24, 2020
@danyeaw danyeaw deleted the model-integrety branch May 24, 2020 18:59
@danyeaw
Copy link
Member

danyeaw commented May 24, 2020

👍

@danyeaw danyeaw modified the milestones: 1.3, 2.0 Jul 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue in the application
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error while opening a previously saved project Can't open diagram with a stalled(?) comment node
2 participants