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

fix(protocol): prevent NullPointerException in BpmnElementType #8142

Merged
1 commit merged into from Nov 4, 2021

Conversation

megglos
Copy link
Contributor

@megglos megglos commented Nov 4, 2021

Description

As the elementTypeName field can be null use Optional.ofNullable in the getter.

Related issues

closes #8141

Definition of Done

Not all items need to be done depending on the issue and the pull request.

Code changes:

  • The changes are backwards compatibility with previous versions
  • If it fixes a bug then PRs are created to backport the fix to the last two minor versions. You can trigger a backport by assigning labels (e.g. backport stable/0.25) to the PR, in case that fails you need to create backports manually.

Testing:

  • There are unit/integration tests that verify all acceptance criterias of the issue
  • New tests are written to ensure backwards compatibility with further versions
  • The behavior is tested manually
  • The change has been verified by a QA run
  • The impact of the changes is verified by a benchmark

Documentation:

  • The documentation is updated (e.g. BPMN reference, configuration, examples, get-started guides, etc.)
  • New content is added to the release announcement

Copy link
Member

@korthout korthout left a comment

Choose a reason for hiding this comment

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

Thanks for the fix @megglos 💐
This change makes perfect sense 🎉

🙃 nothing blocking, but please consider the following before merging (you can simply inform bors when you're ready):

  • your commit message title doesn't comply with our commit message guidelines, specifically bpmn elements should probably be protocol.
  • perhaps the pull request title could have a more meaningful name

- as the elementTypeName field can be null use Optional.ofNullable in getter
@megglos megglos force-pushed the 8141-bpmn-element-enum-npe-fix branch from a7c7641 to 10ad6c4 Compare November 4, 2021 13:07
@megglos megglos changed the title fix(bpmn elements): prevent potential NullPointerException fix(protocol): prevent NullPointerException in BpmnElementType Nov 4, 2021
@megglos
Copy link
Contributor Author

megglos commented Nov 4, 2021

@korthout thanks for the feedback, I adjusted the commit message as well as the title, is the latter now more clear?

@korthout
Copy link
Member

korthout commented Nov 4, 2021

@megglos thanks! 👍 (we try to make the PR titles more human readable and avoid the commit type prefix, but at the same time we are not consistent with this ourselves, so don't worry about it 😆)

@korthout
Copy link
Member

korthout commented Nov 4, 2021

bors merge

@ghost
Copy link

ghost commented Nov 4, 2021

Build succeeded:

@ghost ghost merged commit 895c61b into develop Nov 4, 2021
@ghost ghost deleted the 8141-bpmn-element-enum-npe-fix branch November 4, 2021 14:08
@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2021

Successfully created backport PR #8146 for stable/1.1.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2021

Successfully created backport PR #8147 for stable/1.2.

ghost pushed a commit that referenced this pull request Nov 4, 2021
8146: [Backport stable/1.1] fix(protocol): prevent NullPointerException in BpmnElementType r=korthout a=github-actions[bot]

# Description
Backport of #8142 to `stable/1.1`.

relates to #8141

Co-authored-by: Sebastian Bathke <sebastian.bathke@camunda.com>
ghost pushed a commit that referenced this pull request Nov 4, 2021
8147: [Backport stable/1.2] fix(protocol): prevent NullPointerException in BpmnElementType r=korthout a=github-actions[bot]

# Description
Backport of #8142 to `stable/1.2`.

relates to #8141

Co-authored-by: Sebastian Bathke <sebastian.bathke@camunda.com>
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Potential NPE in BpmnElementType.getElementTypeName
3 participants