Skip to content

Check for null on authorization use when searching for it#1480

Merged
fjtirado merged 1 commit into
serverlessworkflow:mainfrom
fjtirado:check_null_auth
Jun 23, 2026
Merged

Check for null on authorization use when searching for it#1480
fjtirado merged 1 commit into
serverlessworkflow:mainfrom
fjtirado:check_null_auth

Conversation

@fjtirado

Copy link
Copy Markdown
Collaborator

If the definition contains a reference to an auth use, but the use section is null, a NullPointerException was thrown, the proper thing to do was to return an optional empty and move on.

Copilot AI review requested due to automatic review settings June 23, 2026 14:58
Signed-off-by: fjtirado <ftirados@ibm.com>

Copilot AI 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.

Pull request overview

This PR updates AuthProviderFactory to avoid a NullPointerException when resolving authentication providers by reference and the workflow’s use section is missing.

Changes:

  • Added explicit null handling for workflow.getUse() in buildFromReference(...).
  • Refactored buildFromReference(...) to use local variables for Use/UseAuthentications.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI 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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

@fjtirado fjtirado requested a review from mcruzdev June 23, 2026 15:25
@fjtirado fjtirado merged commit f910183 into serverlessworkflow:main Jun 23, 2026
3 checks passed
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.

3 participants