Skip to content

fix: ignore invalid event definition reference#3018

Merged
tbouffard merged 2 commits into
masterfrom
fix/parsing_eventDef_ref
Jan 18, 2024
Merged

fix: ignore invalid event definition reference#3018
tbouffard merged 2 commits into
masterfrom
fix/parsing_eventDef_ref

Conversation

@tbouffard

Copy link
Copy Markdown
Member

Previously, the parser assumed that the identifier reference in the event definition was valid, i.e. that the identifier was defined at the top level.
If this was not the case, the corresponding event definition was not retrieved. The following code attempted to access properties with undefined values.
This generated an error.

Notes

  • to reproduce the problem and check the fix in demo, you can use the diagram used in the new integration test introduced in this PR.
  • this PR only adds an integration test and not a parsing unit test. If you think a unit test is required, please let me know.

Previously, the parser assumed that the identifier reference in the event definition was valid, i.e. that the identifier
was defined at the top level.
If this was not the case, the corresponding event definition was not retrieved. The following code attempted to access
properties with undefined values.
This generated an error.
@tbouffard tbouffard added the bug Something isn't working label Jan 18, 2024
@tbouffard tbouffard requested a review from csouchet January 18, 2024 12:57
@github-actions

github-actions Bot commented Jan 18, 2024

Copy link
Copy Markdown

♻️ PR Preview 2453660 has been successfully destroyed since this PR has been closed.

🤖 By surge-preview

@github-actions

github-actions Bot commented Jan 18, 2024

Copy link
Copy Markdown

♻️ PR Preview 2453660 has been successfully destroyed since this PR has been closed.

🤖 By surge-preview

@csouchet csouchet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enregistrement.de.l.ecran.2024-01-18.a.15.59.40.mov

Comment thread src/component/parser/json/converter/ProcessConverter.ts Outdated
Comment thread src/component/parser/json/converter/ProcessConverter.ts Outdated
Comment thread test/integration/model.elements.api.test.ts Outdated
@sonarqubecloud

Copy link
Copy Markdown

@tbouffard tbouffard merged commit a53ba3c into master Jan 18, 2024
@tbouffard tbouffard deleted the fix/parsing_eventDef_ref branch January 18, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants