-
Notifications
You must be signed in to change notification settings - Fork 635
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
DYN-7082: Improvements to node List.IndexOf #15440
Conversation
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.
See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-7082
UI Smoke TestsTest: success. 11 passed, 0 failed. |
why does this return a string? |
Because we want to return null(and not -1) if the element is not found in the list. After this change, #15205, passing -1 as index would get the last element from the list. |
yeah I'm not getting it - |
Got it, my bad for misunderstanding. Changes should be fine now. |
@reddyashish Maybe add screenshot for behavior diff? |
Updated PR description |
Purpose
https://jira.autodesk.com/browse/DYN-7082
In reference to #15268, to avoid negative index values being returned, we modified IndexOf that will return null when the element is not found in the list.
Before:
After:
Declarations
Check these if you believe they are true
*.resx
filesRelease Notes
DYN-7082: Improvements to node List.IndexOf
Reviewers
(FILL ME IN) Reviewer 1 (If possible, assign the Reviewer for the PR)
(FILL ME IN, optional) Any additional notes to reviewers or testers.