Skip to content

Conversation

@yannaingtun
Copy link

Description:
This PR adds a null check for the process parameter in addAuthorizationsForNewProcessDefinition() to prevent potential NullPointerExceptions when this method is called with a null process.

Issue:
When the process parameter is null, calling process.getCandidateStarterUsers() or process.getCandidateStarterGroups() throws a NullPointerException, which can cause application crashes.

Fix:
Added a conditional check to verify the process parameter is not null before attempting to access its methods.

References:
Similar issue was fixed in: Activiti/Activiti@f4ad999
This implementation applies the same fix pattern to prevent null dereference

@filiphr
Copy link
Contributor

filiphr commented Mar 10, 2025

@yannaingtun can you please provide a test case for this?

I do not see how this piece of code can throw a NullPointerException. Especially, because in the 2 methods before this gets called we get the process from the parsed deployment and invoke something on it without doing a null check.

@filiphr
Copy link
Contributor

filiphr commented Apr 11, 2025

Closing this since my question has not been answered and I don't see how this piece of code can lead to an NPE

@filiphr filiphr closed this Apr 11, 2025
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.

2 participants