-
Notifications
You must be signed in to change notification settings - Fork 168
Add actionId to RESEND component #1022
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
Conversation
...tion.v1/src/main/java/org/wso2/carbon/identity/api/server/flow/execution/v1/utils/Utils.java
Show resolved
Hide resolved
...tion.v1/src/main/java/org/wso2/carbon/identity/api/server/flow/execution/v1/utils/Utils.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AI Agent Log Improvement Checklist
- The log-related comments and suggestions in this review were generated by an AI tool to assist with identifying potential improvements. Purpose of reviewing the code for log improvements is to improve the troubleshooting capabilities of our products.
- Please make sure to manually review and validate all suggestions before applying any changes. Not every code suggestion would make sense or add value to our purpose. Therefore, you have the freedom to decide which of the suggestions are helpful.
✅ Before merging this pull request:
- Review all AI-generated comments for accuracy and relevance.
- Complete and verify the table below. We need your feedback to measure the accuracy of these suggestions and the value they add. If you are rejecting a certain code suggestion, please mention the reason briefly in the suggestion for us to capture it.
| Comment | Accepted (Y/N) | Reason |
|---|---|---|
| #### Log Improvement Suggestion No: 1 | ||
| #### Log Improvement Suggestion No: 2 |
There was a problem hiding this comment.
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 adds logic to automatically set the actionId for RESEND components within FORM components, linking them to the button component's ID found in the same form.
- Adds a constant for the "RESEND" component type
- Implements logic to find button components within forms and assign their IDs as actionIds to RESEND components
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...tion.v1/src/main/java/org/wso2/carbon/identity/api/server/flow/execution/v1/utils/Utils.java
Show resolved
Hide resolved
| component.getComponents().stream().filter(c -> RESEND | ||
| .equals(c.getType())).forEach(c -> c.setActionId(formActionId)); |
Copilot
AI
Oct 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The stream operation is performed on component.getComponents() without null checking, which could cause a NullPointerException. While componentDTO.getComponents() is checked for null, the converted component's components list should also be validated before streaming.
| component.getComponents().stream().filter(c -> RESEND | |
| .equals(c.getType())).forEach(c -> c.setActionId(formActionId)); | |
| if (component.getComponents() != null) { | |
| component.getComponents().stream() | |
| .filter(c -> RESEND.equals(c.getType())) | |
| .forEach(c -> c.setActionId(formActionId)); | |
| } |
There was a problem hiding this comment.
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.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
No description provided.