Skip to content

FIX: Exception thrown when acessing Action's bindings after changing Composite (ISXB-494)#1966

Merged
timkeo merged 1 commit intodevelopfrom
isxb-494-change-bindingpart-exception
Jul 18, 2024
Merged

FIX: Exception thrown when acessing Action's bindings after changing Composite (ISXB-494)#1966
timkeo merged 1 commit intodevelopfrom
isxb-494-change-bindingpart-exception

Conversation

@timkeo
Copy link
Copy Markdown
Collaborator

@timkeo timkeo commented Jul 17, 2024

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:

  • Changelog entry added.
    • Explains the change in Changed, Fixed, Added sections.
    • For API change contains an example snippet and/or migration example.
    • JIRA ticket linked, example (case %%). If it is a private issue, just add the case ID without a link.
    • Jira port for the next release set as "Resolved".
  • Tests added/changed, if applicable.
    • Functional tests Area_CanDoX, Area_CanDoX_EvenIfYIsTheCase, Area_WhenIDoX_AndYHappens_ThisIsTheResult.
    • Performance tests.
    • Integration tests.
  • Docs for new/changed API's.
    • Xmldoc cross references are set correctly.
    • Added explanation how the API works.
    • Usage code examples added.
    • The manual is updated, if needed.

During merge:

  • Commit message for squash-merge is prefixed with one of the list:
    • NEW: ___.
    • FIX: ___.
    • DOCS: ___.
    • CHANGE: ___.
    • RELEASE: 1.1.0-preview.3.

After merge:

  • Create forward/backward port if needed. If you are blocked from creating a forward port now please add a task to ISX-1444.

@timkeo timkeo force-pushed the isxb-494-change-bindingpart-exception branch from f858dee to 49d55ae Compare July 17, 2024 23:09
…Composite (ISXB-494)

A simple, low-risk fix to address the immediate problem.
Also adds a new test to cover this specific scenario.
@timkeo timkeo force-pushed the isxb-494-change-bindingpart-exception branch from 49d55ae to 90b0e7c Compare July 18, 2024 14:57
@timkeo timkeo merged commit 6e43bff into develop Jul 18, 2024
@timkeo timkeo deleted the isxb-494-change-bindingpart-exception branch July 18, 2024 16:18
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