Conversation
f858dee to
49d55ae
Compare
Pauliusd01
approved these changes
Jul 18, 2024
jfreire-unity
approved these changes
Jul 18, 2024
…Composite (ISXB-494) A simple, low-risk fix to address the immediate problem. Also adds a new test to cover this specific scenario.
49d55ae to
90b0e7c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes a corner-case bug where an exception is thrown when accessing an Action's bindings property after modifying a Composite binding. Although this scenario is covered by a test, the bug only occurs when the target action is contained by an ActionMap.
It's unclear exactly why an action in a Map is handled differently than one that isn't, due to the complex functionality of Adding/Updating bindings, and there might be other cases this issue (or something similar) can occur. However, I decided a simple, low-risk fix is preferable to a more fundamental change.
Changes made
Added an Action initializer when creating a new Binding within
BindingSyntax.InsertPartBinding().Added a new test to cover this scenario:
Actions_CanChangeBindingPart_ToExistingCompositeInActionMap()NOTE: The new test is nearly identical to the existing
Actions_CanAddBindingsToActions_ToExistingComposite()test except the target action is added to an ActionMap.Testing
Verified the bug fix, both manually with the customer's repro project and with the new test case.
Risk
Very low-risk change: worst case Action reference is null and we fallback to existing behavior.
Checklist
Before review:
Changed,Fixed,Addedsections.Area_CanDoX,Area_CanDoX_EvenIfYIsTheCase,Area_WhenIDoX_AndYHappens_ThisIsTheResult.During merge:
NEW: ___.FIX: ___.DOCS: ___.CHANGE: ___.RELEASE: 1.1.0-preview.3.After merge: